setVariable
void session.setVariable ( String identifier, Object value )
Description
Set the value of a session variable.
Parameters
- identifier Name of the session variable, as a string.
- value Value of the session variable. This can be any Java object, including (but not llimited to) a String, DataSet, or DataRecord.
Return Values
Returns void.
Change Log
Version | Description |
---|---|
4.5 | Available for all editions. |
Examples
Set Session Variable
// Sets the session variable "CITY_CODE" with the value found
// in the first dataRecord (at index 0) pointed to by the
// identifier "CITY_CODE".
session.setVariable( "CITY_CODE", dataSet.get( 0, "CITY_CODE" ) );
// in the first dataRecord (at index 0) pointed to by the
// identifier "CITY_CODE".
session.setVariable( "CITY_CODE", dataSet.get( 0, "CITY_CODE" ) );
See Also
- addToVariable() [session] - Adds an integer to the value of a session variable.
- getv() [session] - Retrieve the value of a saved session variable (alias of getVariable).
- getVariable() [session] - Retrieve the value of a saved session variable.
- setv() [session] - Set the value of a session variable (alias of setVariable).
scraper on 07/16/2010 at 4:55 pm
- Printer-friendly version
- Login or register to post comments