Inserts a "Exit" button to use return address passed by @wuiJumpButton() macro.
The following parameters are recognized:
The label to put on the button.
List of hidden key/values using @wuiInputHidden()
Optional title attribute to appear as a tooltip to the user when their mouse hovers over the button.
Optional set of attributes to apply to input entity.
Adds the counter part to the @wuiJumpButton() macro. It inserts a button which will jump back to the "return" address passed to the page if present, or to a default anchor point on the default index page (if you 'define' a 'exitAnchor' in your file). When you use this macro, it ends up placing a 'form' into the output stream. Sometimes it is desirable to add extra 'hidden' fields in this form. You can do this by defining the 'wuiExitButtonFields'.
Example of using the macro:
@bashCgiBegin("$Id: bash.xml,v 1.94 2009/09/13 12:15:59 pblankenbaker Exp $","2005-19-27","Test Page") # By default, the @bashCgiBegin() macro above resets # the exitAnchor macro to "" each time its invoked # Set default exit point to Networking area for this page @define("exitAnchor","Networking") # Load form macros and parse form parameters passed . ../include/form.sh; set_query_options; # # We'll make sure the 'interface' and 'protocol' fields # are included on any Exit button submit # @define("wuiExitButtonFields"," @wuiInputHidden("interface","${QUERY_interface}") @wuiInputHidden("protocol","${QUERY_protocol}") ") # # Render page # @wuiHtmlHeader("testPage","Test WUI Page") @p("Blah blah blah blah...") # This button will jump to the #Networking section on the # index page or the value of the "return" parameter if available @wuiExitButton() @wuiHtmlHeader("more","Another Section") # We'll get another exit button at the end because exitAnchor is defined # (we would re-define it as "" if we wanted to disable this). @bashCgiEnd()
Assuming the com.ccg.macros.at.All
class is within your CLASSPATH
and the
config/bash.at
macros file has been
generated (Hint: run make atmacros in the
wui
directory), a developer should be able to
run the above example by copy/pasting from below:
[root@probe root]#
java com.ccg.macros.at.All <<EOF
@include("config/bash.at",,"d")
@bashCgiBegin("$Id: bash.xml,v 1.94 2009/09/13 12:15:59 pblankenbaker Exp $","2005-19-27","Test Page") # By default, the @bashCgiBegin() macro above resets # the exitAnchor macro to "" each time its invoked # Set default exit point to Networking area for this page @define("exitAnchor","Networking") # Load form macros and parse form parameters passed . ../include/form.sh; set_query_options; # # We'll make sure the 'interface' and 'protocol' fields # are included on any Exit button submit # @define("wuiExitButtonFields"," @wuiInputHidden("interface","${QUERY_interface}") @wuiInputHidden("protocol","${QUERY_protocol}") ") # # Render page # @wuiHtmlHeader("testPage","Test WUI Page") @p("Blah blah blah blah...") # This button will jump to the #Networking section on the # index page or the value of the "return" parameter if available @wuiExitButton() @wuiHtmlHeader("more","Another Section") # We'll get another exit button at the end because exitAnchor is defined # (we would re-define it as "" if we wanted to disable this). @bashCgiEnd()
EOF
This macro is defined as:
@wuiContinueButton("${QUERY_return:-\"@topDir()/index.cgi@ifEqual("exitAnchor",,,"#@exitAnchor()")\"}","@fnb("@param(0)","Exit")","@param(1)@wuiExitButtonFields()","@param(2)","@fnb("@param(3)","@htmlAttr("style","display: inline;")")")