Classes


Class actuate.Parameter

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.
Member of: actuate.

Class Summary
Constructor Attributes Constructor Name and Description
 
actuate.Parameter(container)
Constructs a Parameter object for a page, initializing the parameter component.
Method Summary
Method Attributes Method Name and Description
 
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.
 
Returns an array of the actuate.parameter.ParameterValue objects for the Parameter object.
 
Returns the parameter layout type.
 
Returns all the group names for the parameter page as an array of strings.
 
Returns the name of the report file currently referenced by this Parameter object.
 
Returns the name of the transient document generated by running the report currently referenced by this Parameter object.
 
Hides the navigation bar for the parameter component in the LAYOUT_GROUP layout.
 
hideParameterGroup(groupNames)
Hides all report parameters that belongs to a group or to a list of groups.
 
hideParameterName(parameterNames)
Hides report parameters as specified by name.
 
navigate(containerId, navTarget)
Changes the displayed page or changes the current position on the page.
 
Performs garbage collection for the parameter object and unloads JavaScript variables that are no longer needed by Parameter.
 
registerEventHandler(eventName, handler)
Registers an event handler to activate for parameter events.
 
removeEventHandler(eventName, handler)
Removes an event handler.
 
renderContent(paramDefs, callback)
Renders the parameter component to the container.
 
Sets the autosuggest delay time.
 
Sets the fetch size of the autosuggestion list.
 
Sets the length of the autosuggestion list.
 
setContainer(containerID)
Sets the HTML element container for the parameter content.
 
setExpandedGroups(groupNames)
Defines a set of groups that are expanded by default.
 
setFont(fontStyleString)
Sets the font of the parameter page content after the page is rendered.
 
setGroupContainer(groupNames, containerID)
Sets the HTML element container for the provided group.
 
setLayout(layout)
Sets the parameter layout.
 
setReadOnly(readOnly)
Sets the parameters to read-only.
 
setReportName(reportName)
Sets the report file from which to get report parameters.
 
setService(iportalURL, requestOptions)
Sets the target service URL to which the Parameter object links.
 
setShowDisplayType(showDisplayType)
Sets whether localized data is shown or not.
 
submit(callback)
Submits requests to the server for the report parameters.
Class Detail
actuate.Parameter(container)
Constructs a Parameter object for a page, initializing the parameter component.
Parameters:
{String} container
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.
Method Detail
{void} downloadParameters(callback)
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. This example retrieves a set of report parameters and sends them to a callback function.
	function getChartParams(myParameter){
		myParameter.downloadParameters(callback( ));
	}
																	
Parameters:
{Function} callback
The function to call after the download of report parameters is completed.
Returns:
{void}
See:
actuate.parameter.ParameterDefinition

{void} downloadParameterValues(callback)
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. To download the parameter values and add them to an actuate.viewer, the callback function must use the values as an input parameter, as shown in the following code:
	paramObj.downloadParameterValues(runNext);
	function runNext(values){
		viewer.setParameterValues(values);
	}
																	
Parameters:
{Function} callback
The function to execute after the report parameters finish downloading. downloadParameterValues sends an array of actuate.parameter.ParameterValue objects to the callback function as an input argument.
Returns:
{void}
See:
actuate.parameter.ParameterValue

{String} getLayout()
Returns the parameter layout type. This example calls getLayout( ) to display the parameter layout type in an alert box:
	alert(paramObj.getLayout( ));
Returns:
{String} The parameter layout, which will match one of the layout constants in actuate.parameter.Constants.
See:
actuate.parameter.Constants.LAYOUT_NONE
actuate.parameter.Constants.LAYOUT_GROUP
actuate.parameter.Constants.LAYOUT_COLLAPSIBLE

{String[ ]} getParameterGroupNames()
Returns all the group names for the parameter page as an array of strings. This method should be called after report parameter is available. This example displays an alert box with the name of the first group for the parameter page:
	var groupNames = paramObj.getParameterGroupNames( );
	alert("First Group Name: " + groupNames[0]);
Returns:
{String[ ]} Each string is a group name.

{String} getReportName()
Returns the name of the report file currently referenced by this Parameter object. This example displays an alert box with the name of the report file:
	alert("Report file: " + paramObj.getReportName( ));
Returns:
{String} The report file name.

{String} getTransientDocumentName()
Returns the name of the transient document generated by running the report currently referenced by this Parameter object. This example displays an alert box with the name of the transient document:
	alert("Transient document: " + paramObj.getTransientDocumentName( ));
Returns:
{String} The transient document name.

{void} hideNavBar()
Hides the navigation bar for the parameter component in the LAYOUT_GROUP layout. This example hides the navigation bar:
	paramObj.hideNavBar( );
	alert("Navigation bar is hidden");
Returns:
{void}

{void} hideParameterGroup(groupNames)
Hides all report parameters that belongs to a group or to a list of groups. This example hides the report parameters that belong to the groups that are listed in the myGroups string array:
	var myGroups = ["Group1", "Group2", "Group3"];
	paramObj.hideParameterGroup(myGroups);
	alert("Groups are hidden");
Parameters:
{String} groupNames
String or array of strings. Hides any groups listed.
Returns:
{void}

{void} hideParameterName(parameterNames)
Hides report parameters as specified by name. This example hides the parameters that are listed in the myParams string array:
	var myParams = ["Parameter1", "Parameter2", "Parameter3"];
	paramObj.hideParameterName(myParams);
	alert("Parameters are hidden");
Parameters:
{String} parameterNames
String or array of strings.
Returns:
{void}

{void} navigate(containerId, navTarget)
Changes the displayed page or changes the current position on the page. The actuate.Parameter class displays the parameters by page. This example displays the last page of the parameter component in the HTML <div> element with the myParams ID:
	function myParamsLast(myParameter){
		myParameter.navigate("myParams", NAV_LAST);
	}
																	
Parameters:
{String} containerId
The value of the id parameter for the HTML <div> element that holds the parameter component.
{String} navTarget
Which navigation button to trigger. Possible values from actuate.parameter.Constants are NAV_FIRST, NAV_PREV, NAV_NEXT, NAV_LAST.
Returns:
{void}
See:
actuate.parameter.Constants.NAV_FIRST
actuate.parameter.Constants.NAV_PREV
actuate.parameter.Constants.NAV_NEXT
actuate.parameter.Constants.NAV_LAST

{void} onUnload()
Performs garbage collection for the parameter object and unloads JavaScript variables that are no longer needed by Parameter. This example unloads JavaScript variables and displays an alert box:
	myParameter.onUnload();
	alert("JS variables unloaded.");
Returns:
{void}

{void} registerEventHandler(eventName, handler)
Registers an event handler to activate for parameter events. This function can assign several handlers to a single event. To register an event handler to catch exceptions, call actuate.Parameter.registerEventHandler using the ON_EXCEPTION constant after creating the viewer object, as shown in the following example:
	function initParameter( ){
		parameter = new actuate.Parameter("acparameter");
		parameter.registerEventHandler(actuate.parameter.EventConstants.ON_CHANGED, errorHandler);
	}
Parameters:
{actuate.parameter.EventConstants} eventName
A constant corresponding to a supported event. actuate.Parameter supports the following two events:
{Function} handler
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.
Returns:
{void}
See:
actuate.parameter.EventConstants for supported parameter events

{void} removeEventHandler(eventName, handler)
Removes an event handler. To remove an event handler, call actuate.Parameter.removeEventHandler with a legal event constant, as shown in the following example:
	function cleanupParameter( ){
		parameter.removeEventHandler(actuate.parameter.EventConstants.ON_CHANGED, errorHandler);
	}
Parameters:
{actuate.parameter.EventConstants} eventName
A constant corresponding to a supported event. actuate.Parameter supports the following two events:
{Function} handler
A handler function registered for the event.
Returns:
{void}
See:
actuate.parameter.EventConstants for supported parameter events

{void} renderContent(paramDefs, callback)
Renders the parameter component to the container. This example calls renderContent( ) after hiding parameter groups:
	function showNoGroups(myParameter){
		myParameter.hideParameterGroup(zipcodes);
		myParameter.renderContent(myParameterArray, cleanupParameter(myParameter));
	}
Parameters:
{Array} paramDefs
Array of actuate.parameter.ParameterDefinition objects.
{Function} callback
The function to execute after the rendering is done.
Returns:
{void}

{void} setAutoSuggestDelay(delay)
Sets the autosuggest delay time. This example implements a custom autosuggest 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);
	}
Parameters:
{long} delay
Interpreted as milliseconds.
Returns:
{void}

{void} setAutoSuggestFetchSize(size)
Sets the fetch size of the autosuggestion list. Autosuggest fetches all suggestions from the server when the fetch size is not set. This example implements a custom autosuggest 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);
	}
Parameters:
{Integer} size
The number of suggestions to fetch at a time.
Returns:
{void}

{void} setAutoSuggestListSize(size)
Sets the length of the autosuggestion list. Autosuggest shows all of the suggestions from the server when the list length is not set. This example implements a custom autosuggest 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);
	}
Parameters:
{Integer} size
The number of suggestions to display.
Returns:
{void}

{void} setContainer(containerID)
Sets the HTML element container for the parameter content. This example sets the container where the parameter components render:
	paramObj.setContainer("leftpane");
Parameters:
{String} containerID
The name of the HTML element that displays the group of rendered parameter components.
Returns:
{void}

{void} setExpandedGroups(groupNames)
Defines a set of groups that are expanded by default. This example sets the "Motorcycles", "Trucks", and "Airplanes" groups as expanded by default:
	var myGroups = new Array["Motorcycles", "Trucks", "Airplanes"];
	paramObj.setExpandedGroups(myGroups);
Parameters:
{String[ ]} groupNames
The group names to expand by default.
Returns:
{void}
See:
actuate.parameter.Constants.LAYOUT_COLLAPSIBLE

{void} setFont(fontStyleString)
Sets the font of the parameter page content after the page is rendered. This example sets the font to Arial for the parameters page:
	paramObj.setFont("arial");
Parameters:
{String} fontStyleString
The name of a font.
Returns:
{void}

{void} setGroupContainer(groupNames, containerID)
Sets the HTML element container for the provided group. All parameter objects listed in groupNames are assigned to the container. This example assigns the group names in the myGroups string array to the leftpane HTML element:
	var myGroups = ["Group1", "Group2", "Group3"];
	paramObj.setGroupContainer(myGroups, "leftpane");
Parameters:
{String[ ]} groupNames
The group names to be assigned.
{String} containerID
The name of the HTML element that displays the group of rendered parameter components.
Returns:
{void}

{void} setLayout(layout)
Sets the parameter layout. This example sets the parameter object's layout type to LAYOUT_COLLAPSIBLE:
	paramObj.setLayout("LAYOUT_COLLAPSIBLE")
Parameters:
{actuate.parameter.Constants} layout
Type of layout.
Returns:
{void}
See:
actuate.parameter.Constants.LAYOUT_NONE
actuate.parameter.Constants.LAYOUT_GROUP
actuate.parameter.Constants.LAYOUT_COLLAPSIBLE

{void} setReadOnly(readOnly)
Sets the parameters to read-only. This example makes the parameters read-only:
	paramObj.setReadOnly(true);
Parameters:
{boolean} readOnly
True indicates that the parameters are read-only.
Returns:
{void}

{void} setReportName(reportName)
Sets the report file from which to get report parameters. To set the name using an HTML input tag with an ID of Selector, use the following code:
	myViewer.setReportName(document.getElementById("Selector").value);
Parameters:
{String} reportName
The report file path and name. The report file can be a report design file or a report document file.
Returns:
{void}

{void} setService(iportalURL, requestOptions)
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. This example sets the URL for the Actuate iPortal web application service:
	paramObj.setService("http://localhost:8700/iportal", myRequestOptions);
Parameters:
{String} iportalURL
The target Actuate web application URL.
{actuate.RequestOptions} requestOptions
Optional. Defines URL parameters to send with the authentication request, such as the iServer URL, Encyclopedia volume, or repository type. The URL can also include custom parameters.
Returns:
{void}
See:
actuate.RequestOptions

{void} setShowDisplayType(showDisplayType)
Sets whether localized data is shown or not. This example hides localized data:
	paramObj.setShowDisplayType(false);
	paramObj.submit(alert("Localized data hidden.");
Parameters:
{boolean} showDisplayType
True indicates that localized data is shown.
Returns:
{void}

{void} submit(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. This example calls submit( ) after hiding localized data:
	paramObj.setShowDisplayType(false);
	paramObj.submit(alert("Localized data hidden."));
Parameters:
{Function} callback
The function to execute after the asynchronous call processing is done.
Returns:
{void}

Documentation generated by JsDoc Toolkit 2.0.1 on Tue Jan 29 2013 05:44:21 GMT-0800 (PST)