@wuiInputFileEditButton(FILE, LABEL, [SAVERETURL], [SYNCKEY], [ATTRS], [NOSAVERETURL], [IEFORCEJUMP], [RETURN_FROM], [RETURN_LABEL], [RETURN_BACK], [RETURN_LABEL_BACK], [RETURN_FROM_BACK])

Inserts a form containing a single button to allow user to edit the contents of a file.

The following parameters are recognized:

FILE

NAME of file which user can edit (will be returned as "path" if user saves file).

LABEL

Lable for the button.

[SAVERETURL]

The URL to return to when user saves file or exits.

[SYNCKEY]

The sync key to pass along (will be returned on exit).

[ATTRS]

Optional set of attributes to apply to the input button.

[NOSAVERETURL]

The URL to return to when user exits without saving (defaults to SAVERETURL if omitted).

[IEFORCEJUMP]

Used for jumping to an exact location on a page specific to the IE browser when returning from the NST File Viewer. Set this parameter to an "ID Tag Attribute" on the page as an anchor to jump to.

[RETURN_FROM]

Optional return from calling page text.

[RETURN_LABEL]

Optional label to put on the page exit button. Defaults to "Exit" if omitted.

[RETURN_BACK]

Optional way to save current return when coming back from the editor.

[RETURN_LABEL_BACK]

Optional way to save current return button label when coming back from the editor.

[RETURN_FROM_BACK]

Optional way to save current return page tooltip coming back from the editor.

This macro inserts a button into your page permitting the user to edit the contents of the file. If the user "saves" their edits, control will be returned to the page specified in "SAVERETURL". NOTE: If the user presses the save button, the file will not actually be saved, instead the "save_action" parameter will be set to "save" and the "contents" parameter will contain the new contents of the file. To actually save the file, your handler page should use the @wuiInputFileSave() macro and pass the value of "contents" as the first parameter. If the user exits from the page without saving their edits, the "save_action" parameter will be set to "nosave" and control will be returned to the page specified in "NOSAVERETURL" parameter if it was specified (falling back to "SAVERETURL" if "NOSAVERETURL" was omitted).

Example of using the macro:

See: nstwui/php/system/examples/edit.cgi.

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")
See: nstwui/php/system/examples/edit.cgi.
EOF

This macro is defined as:

@formBegin("@topDir()/php/system/edit.php")
  @wuiInputHidden("path","@param(0)")
  @wuiInputHidden("return_save","@fnb("@param(2)","@topDir()/index.cgi")")
  @wuiInputHidden("return","@fnb("@param(5)","@param(2)")")
  @wuiInputHidden("return_from","@fnb("@param(7)","Calling Page")")
  @wuiInputHidden("return_label","@param(8)")
  @wuiInputHidden("synckey","@param(3)")
  @wuiInputHidden("return_back","@param(9)")
  @wuiInputHidden("return_label_back","@param(10)")
  @wuiInputHidden("return_from_back","@param(11)")
  @wuiInputHidden("ieForceJump","@param(6)")
  @wuiInputButton("edit","@param(1)",,"@fnb("@param(4)","@toolTipAttr("@jsn("Edit") the contents of @jstc("File","@toolTipEmphasis()"): &quot;@jsex("@htmlEscape("@param(0)")","@toolTipValue()")&quot;","$(calcDomTTLen "@param(0)" 200 320 1600)")")")
@formEnd()