com.tle.web.controls.advancedscript.scripting.objects
Interface RequestMapScriptObject
Declaration: public interface RequestMapScriptObject extends ScriptObject
All Superinterfaces: ScriptObject, java.io.Serializable

 

Referenced by the 'request' variable in script (OnSubmit script only). Allows you to retrieve request parameters of any inputs/selects you have rendered in your display template. All input/select names must be prefixed with ${prefix}

 

 

Fields Summary
static java.lang.String DEFAULT_VARIABLE
    

 

 

Methods Summary
abstract java.lang.String get(java.lang.String key)
    
Returns a single value posted by this control.
abstract java.lang.String[] getList(java.lang.String key)
    
Returns a list of values posted by this control.

 

Methods inherited from interface: com.tle.common.scripting.ScriptObject
scriptEnter, scriptExit

 

 

 

 

DEFAULT_VARIABLE

 

public static final java.lang.String DEFAULT_VARIABLE

 

See also: Constants

 

 

 

 

get

 

public abstract java.lang.String get( java.lang.String key)

 

Returns a single value posted by this control. Note that you must use ${prefix} on the name of any input you are going to read on the server. E.g. <input type="hidden" name="${prefix}myInput" value="test"> will be read as request.get('myInput') in script

 

Parameters:
key-
The un-prefixed name of the value to read
Returns:
A single value, or null if nothing with the specified key was posted

 

 

 

getList

 

public abstract java.lang.String[] getList( java.lang.String key)

 

Returns a list of values posted by this control. This is used in the case of checkboxes or multiple input fields with the same name. Note that you must use ${prefix} on the name of any input you are going to read on the server. E.g. <input type="hidden" name="${prefix}myInput" value="test">
<input type="hidden" name="${prefix}myInput" value="test2"> will be read as request.getList('myInput') in script

 

Parameters:
key-
The un-prefixed name of the values to read
Returns:
An array of values, or null if nothing with the specified key was posted