Class actuate.RequestOptions
Description
The request options that loginServlet requires to authenticate requests. RequestOptions is used by other classes to provide authentication information. It also adds any customized options to the request URL.
Constructor
Syntax
actuate.RequestOptions( actuate.RequestOptions requestOptions)
Constructs a new RequestOptions object.
Parameter
requestOptions
actuate.RequestOptions object. Optional. Provides request option settings to copy into this RequestOptions object.
Function summary
Table 14‑41 lists actuate.RequestOptions functions.
Table 14‑41 actuate.RequestOptions functions 
Function
Description
Returns the current locale
Appends custom parameters to the request URL
Sets the locale
getLocale
Syntax
string RequestOptions.getLocale( )
Returns the current locale or null if no locale is set.
Returns
String. The locale value; null for default.
Example
This example pops up an alert box if the locale value is set to the default:
var locale = reqOpts.getLocale( );
if (locale == null){
alert("Locale value is default");
}
setCustomParameters
Syntax
void RequestOptions.setCustomParameters(object parameters)
Returns a custom parameter in the request URL.
Parameter
parameters
Object. An associative array of name:value pairs for URL parameters.
Example
To add "&myParam=myValue" in a request URL derived from RequestOptions object, use code similar to the following:
MyRequestOptions.setCustomParameters({myParam: "myValue"});
setLocale
Syntax
void RequestOptions.setLocale(string Locale)
Sets the locale.
Parameter
Locale
String. Optional. The locale value. Null indicates the default locale.
Example
This example resets the locale for the reqOpts RequestOptions object to the default value provided by the actuate web service to which the JSAPI connects:
reqOpts.setLocale( );
This example resets the locale for the reqOpts RequestOptions object to the Spain using the Spanish locale code listed in <context root>\WEB-INF\localemap.xml:
reqOpts.setLocale("es_ES");