The actuate.Parameter class retrieves and displays Actuate BIRT report parameters in an HTML container. Users can interact with the parameters on the page and pass parameter values to an actuate.Viewer object, but not to the server directly.
The actuate.Parameter class displays the parameters by page. The actuate.parameters.navigate( ) function changes the page display or changes the current position on the page.
Constructor
Syntax
actuate.Parameter(string container)
Constructs a parameter object for a page, initializing the parameter component.
Parameter
container
String. The name of the HTML element that displays the rendered parameter component or a container object. The constructor initializes the parameter component but does not render it.
Retrieves an array of actuate.parameter.ParameterDefinition objects that contain the report parameters for the report and sends the array to the callback function, which must take the array as an input parameter.
Parameter
callback
Function. The function to execute after the report parameters finish downloading. Parameter.downloadParameters( ) sends an array of actuate.parameter.ParameterDefinition objects to the callback function as an input argument.
Example
This example retrieves a set of report parameters and sends them to a callback function.
Returns an array of the actuate.parameter.ParameterValue objects for the parameter object. If no values have been set, the parameter object downloads the default values from the server.
Parameter
callback
Function. The function to execute after the report parameters finish downloading. Parameter.downloadParameterValues( ) sends an array of actuate.parameter.ParameterValue objects to the callback function as an input argument.
Example
To download the parameter values and add them to the viewer, the callback function must use the values as an input parameter, as shown in the following code:
Function. The function to execute when the event occurs. The handler must take two arguments: the parameter instance that fired the event and an event object specific to the event type.
Example
To register an event handler to catch exceptions, call actuate.Parameter.registerEventHandler using the ON_CHANGED constant after creating the viewer object, as shown in the following example:
void Parameter.renderContent(actuate.parameter.ParameterDefinition[ ] paramDefs, function callback)
Renders the parameter component to the container.
Parameters
paramDefs
Array of actuate.parameter.ParameterDefinition objects.
callback
Function. The function to execute after the rendering is done.
Example
This example calls renderContent( ) after hiding parameter groups:
function showNoGroups(myParameter){
myParameter.hideParameterGroup(zipcodes);
myParameter.renderContent(myParameterArray,
cleanupParameter(myParameter));
}
setAutoSuggestDelay
Syntax
void Parameter.setAutoSuggestDelay(long delay)
Sets the auto suggest delay time.
Parameter
delay
Long. Interpreted as milliseconds.
Example
This example implements a custom auto suggest list. The list is 10 suggestions long and displays 3 suggestions at a time after a delay of 250 milliseconds.
Sets the fetch size of the auto suggestion list. AutoSuggest fetches all suggestions from the server when the fetch size is not set.
Parameter
size
Integer. The number of suggestions to fetch at a time.
Example
This example implements a custom auto suggest list. The list is 10 suggestions long and displays 3 suggestions at a time after a delay of 250 milliseconds.
Sets the length of the auto suggestion list. AutoSuggest shows all of the suggestions from the server when the list length is not set.
Parameter
size
Integer. The number of suggestions to display.
Example
This example implements a custom auto suggest list. The list is 10 suggestions long and displays 3 suggestions at a time after a delay of 250 milliseconds.
function myCustomAutoSuggest(myParameter){
myParameter.setAutoSuggestFetchSize(10);
myParameter.setAutoSuggestListSize(3);
myParameter.setAutoSuggestDelay(250);
}
setExpandedGroups
Syntax
void Parameter.setExpandedGroups(groupNames)
Defines a set of groups that are expanded by default.
Parameter
groupNames
Array of strings. The group names to expand by default.
Example
This example sets the "Motorcycles", "Trucks", and "Airplanes" groups as expanded by default:
var myGroups = new Array["Motorcycles", "Trucks", "Airplanes"];
paramObj.setExpandedGroups(myGroups);
setFont
Syntax
void Parameter.setFont(string fontStyleString)
Sets the font of the parameter page content after the page is rendered.
Parameter
fontStyleString
String. The name of a font.
Example
This example sets the font to Arial for the parameters page:
Sets the target service URL to which the Parameter object links. If the service URL is not set, this Parameter object links to the default service URL set on the actuate object.
Parameters
iPortalURL
String. The target Actuate web application URL.
requestOptions
actuate.RequestOptions object. Optional. requestOptions defines URL parameters to send with the authentication request, such as the iHub URL, volume, or repository type. The URL can also include custom parameters.
Example
This example sets the URL for the Actuate iPortal web application service:
Boolean. True indicates that localized data is shown.
Example
This example hides localized data:
paramObj.setShowDisplayType(false);
paramObj.submit(alert("Localized data hidden.");
submit
Syntax
void Parameter.submit(function callback)
Submits requests to the server for the report parameters. When this function is called, an AJAX request is triggered to submit all the operations. When the server finishes the processing, it returns a response and the results are rendered on the page in the parameter container.
Parameter
callback
Function. The function to execute after the asynchronous call processing is done.
Example
This example calls submit( ) after hiding localized data: