Global variable overrides
You can use this feature to pass data from the user into the application. For example, you can allow the user to supply a user ID and password, and use them to run a macro.
For ZIETrans Web applications, to override a local global variable, you add an HTML parameter hatsgv_varName=newValue to the client's HTTP request. To override a shared global variable, the parameter name is hatssharedgv_varName.
To allow the user to create and set the value of a shared global
variable named UserID, you can supply an input
field by adding the following statement to the body of the <ZIETrans:Form>
tag of a transformation JSP:
<INPUT name="hatssharedgv_UserID" type="TEXT" size="10">Any
value supplied by the user becomes the new value of the shared variable UserID. If you create the value by JavaScript™, instead, and do
not want the user to be able to enter the new value, you can use a
hidden input field and supply the value yourself:
<INPUT name="hatssharedgv_UserID" size="10" type="HIDDEN" value="alice">To
create a new global variable or change the global variable's value
in the URL, something like the following URL can be used in a GET
request:
http://hostname/appname/entry?teagv_UserID=bobTo control which ZIETrans global variables, if any, can be created
or changed by a user's client request, click one of the following
radio buttons:
- Allow all global variables to be overridden by client requests
- This button allows you to override all global variables except for any listed and selected in the table.
- Do not allow any global variables to be overridden by client requests
- If you click this button, you will not be able to override any global variables except for those listed and selected in the table.
You can add a global variable exception by clicking the Add button. There you can either type a global variable name in the text box or select it from the drop-down list. Select the Shared global variable check box to indicate a global variable that can be shared. For more information, see Interacting with global variables.
If you want to edit a table entry, click Edit.
The Remove button will delete the
highlighted global variable from the list of exceptions.
Note: The
default for new ZIETrans applications is to disallow any global variables
to be overridden by client requests.