Inserts HTML such that a single standard Exit/Return button will appear in the page output (if necessary).
The following parameters are recognized:
The ID for the DOM node.
This macro is used to insert a "marker" into the HTML output which will be replaced (via NstDom.addIdEnhance() registration) with an appropriate Exit/Return button. The button will appear on the page if either of the following two conditions are true. One, the page registered a default "exit" location via a JavaScript call to "NstDom.setExitUrl(URL);" or "NstDom.setExitFunction(f)". Or two, the JavaScript _SUBMIT[] array is available and contains a 'return' entry (this array is typically CGI built using GET/POST values).
Example of using the macro:
@javascriptBegin() // Set default exit location (if no 'return' passed) // If you omit this, then buttons will be omitted unless // the calling page passes a "return" value. NstDom.setExitUrl("/nstwui/index.cgi"); @javascriptEnd() @comment(" Following would typically be added at the bottom of the page, or the bottom of any particularily long sections Calling page may use the following overrides to control the appearance and behavior of the button: 'return=/nstwui/index.cgi' URL to jump to when pressed 'return_label=Return' Label for button 'return_tooltip=My full DOM tooltip' Full tooltip for button 'return_from=WPA Setup' Partial tooltip - used to build tooltip in standard form 'return_tooltip_width=400' Override for width of tooltip ") @insertExitButtonRow('mainBodyExit');
Assuming the com.ccg.macros.at.All
class is within your CLASSPATH
and the
config/html.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/html.at",,"d")
@javascriptBegin() // Set default exit location (if no 'return' passed) // If you omit this, then buttons will be omitted unless // the calling page passes a "return" value. NstDom.setExitUrl("/nstwui/index.cgi"); @javascriptEnd() @comment(" Following would typically be added at the bottom of the page, or the bottom of any particularily long sections Calling page may use the following overrides to control the appearance and behavior of the button: 'return=/nstwui/index.cgi' URL to jump to when pressed 'return_label=Return' Label for button 'return_tooltip=My full DOM tooltip' Full tooltip for button 'return_from=WPA Setup' Partial tooltip - used to build tooltip in standard form 'return_tooltip_width=400' Override for width of tooltip ") @insertExitButtonRow('mainBodyExit');
EOF
This macro is defined as:
<div@htmlAttr("id","@param(0)")>@javascriptBegin() NstDom.addIdEnhance('@param(0)', NstDom.replaceWithExitButtonRow); @javascriptEnd()</div>