@wuiBrowseButton(DIR, [LABEL], [RETURN], [TITLE], [RETURN_FROM], [DIRFILTER], [FILEFILTER], [ATTR], [RETURNLABEL], [SYNCKEY], [FORMATTRS])

Inserts HTML form (single button) to take user to directory browser.

The following parameters are recognized:

DIR

The directory on the server to browse.

[LABEL]

The text to appear on the button (defaults to directory if omitted).

[RETURN]

The URL to return to if user presses the "Exit" button.

[TITLE]

Optional title attribute to appear as a tooltip to the user when their mouse hovers over the button.

[RETURN_FROM]

Optional return from label.

[DIRFILTER]

Optional directory filter value (defaults to ".* *" if omitted).

[FILEFILTER]

Optional file filter value (defaults to ".* *" if omitted).

[ATTR]

Optional set of attributes to apply to input entity.

[RETURNLABEL]

Optional browse button return label (defaults to "Return" if omitted).

[SYNCKEY]

Optional parameter passing SYNCKEY value.

[FORMATTRS]

Optional set of attributes to apply to the form entity.

This macro allows one to insert a button to take the user to the NST directory browser for a particular directory on the server. Unfortunately, there is no return parameter.

Example of using the macro:

@wuiBrowseButton("/var/log")
@wuiBrowseButton("/root","home directory","../my.cgi","This is my home directory","My Page",,"*.txt","@htmlAttr("style","width: 100%;")")

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")

@wuiBrowseButton("/var/log")
@wuiBrowseButton("/root","home directory","../my.cgi","This is my home directory","My Page",,"*.txt","@htmlAttr("style","width: 100%;")")

EOF

This macro is defined as:

<form@htmlAttr("action","@topDir()/cgi-bin/system/browse.cgi")@ifEqual("@param(10)","","","@param(10)")>
  @wuiInputHidden("path","$(echo "@param(0)" | html_doublequote_escape 2> /dev/null)")
  @wuiInputHidden("return","@ifEqual("@param(2)","","../../index.cgi#System","$(echo "@param(2)" | html_doublequote_escape 2> /dev/null)")")
  @ifEqual("@param(9)","","","@wuiInputHidden("synckey","@param(9)")")
  @wuiInputHidden("return_from","@param(4)")
  @wuiInputHidden("return_label","@ifEqual("@param(8)","","Return","@param(8)")")
  @wuiInputHidden("dir_match","$(echo "@fnb("@param(5)",".* *")" | html_doublequote_escape 2> /dev/null)")
  @wuiInputHidden("file_match","$(echo "@fnb("@param(6)",".* *")" | html_doublequote_escape 2> /dev/null)")
  @wuiInputButton("browse","@fnb("@param(1)","@param(0)")","@param(3)","@param(7)")
</form>