Class actuate.XTabAnalyzer
Description
The actuate.XTabAnalyzer class represents a XTabAnalyzer viewer.
Constructor
Syntax
Constructs a new Data Analyzer object.
Constructs a new Data Analyzer object in the specified container.
Parameters
Object. A document object referencing the HTML <div> element that contains the xTabAnalyzer viewer.
String. The value of the ID parameter for the HTML <div> element which holds the xTabAnalyzer viewer. For example, with 'containerName' as the xtabContainer parameter, a <DIV ID='containerName' /> tag on the page displays the viewer at the location of the <div> element.
actuate.xtabanalyzer.UIOptions object. Optional. UIOptions references display options for the viewer.
Function summary
Table 5-2 lists actuate.XTabAnalyzer functions.
Table 5-2 actuate.XTabAnalyzer functions commit( ) getId( ) Returns the Actuate web application URL that the viewer accesses. getLeft( ) getTop( ) Returns the actuate.xtabanalyzer.UIOptions object assigned to this viewer. Returns the bookmark of the cross tab displayed in the viewer. Returns the instance ID of the cross tab displayed in the viewer. Checks if the current viewer popup is a dashboard. reset( ) Rolls back all changes in the viewer and refreshes its content. setLeft( ) setTop( ) submit( ) Submits asynchronous operations and renders the requested components.actuate.XTabAnalyzer.commit
Syntax
Commits all design changes to a generated document as a single operation. If ivMode is not set to true, call setIVMode( ) to set the value of ivMode to true before calling commit( ).
Parameter
Function. The callback function called after the commit is completed.
Example
This example opens a design with a cross tab and pivots the cross tab.
actuate.XTabAnalyzer.forceSoftRestart
Syntax
Example
This example restarts the viewer.
actuate.XTabAnalyzer.getCurrentPageContent
Syntax
Returns the current page content object.
Returns
actuate.xtabanalyzer.PageContent object.
Example
This example calls getCurrentPageContent( ) to retrieve a pointer to the cross tab on the page.
actuate.XTabAnalyzer.getCurrentPageNum
Syntax
Returns the current page content object.
Returns
Example
This example retrieves the page number.
actuate.XTabAnalyzer.getGadgetId
Syntax
Returns the gadget ID of the shown cross tab. This function is used for dashboard integration.
Returns
Example
This example retrieves the gadget ID.
actuate.XTabAnalyzer.getHeight
Syntax
Returns the height of the viewer.
Returns
Example
This example retrieves the current height of the viewer and doubles the height if the current height is lower than 630 pixels.
actuate.XTabAnalyzer.getId
Syntax
Returns
Example
This example retrieves the viewer ID.
actuate.XTabAnalyzer.getIportalUrl
Syntax
Returns the Deployment Kit for BIRT Reports or Information Console URL.
Returns
Example
This example retrieves the Iportal URL.
actuate.XTabAnalyzer.getLeft
Syntax
Returns the left margin of the viewer.
Returns
Example
This example retrieves the position of the viewer’s left margin and moves the margin 20 pixels to the right if the left margin is fewer than 45 pixels from the left edge of the screen.
actuate.XTabAnalyzer.getPosition
Syntax
Returns the CSS position attribute for the viewer.
Returns
Example
This example changes the CSS positioning type from relative to absolute.
actuate.XTabAnalyzer.getRequestOptions
Syntax
Returns a requestOptions object.
Returns
actuate.RequestOptions object.
Example
This example retrieves the request options.
actuate.XTabAnalyzer.getTop
Syntax
Returns the top margin of the viewer.
Returns
Example
This example retrieves the value for the viewer’s top margin and moves the margin 20 pixels down the screen if the margin was fewer than 45 pixels from the top of the screen.
actuate.XTabAnalyzer.getTotalPageCount
Syntax
Returns
Example
This example displays an alert with the total page count from viewer.
actuate.XTabAnalyzer.getUIOptions
Syntax
Returns the user interface options object for the cross tab analyzer. The UIOptions object specifies what features are used within the viewer.
Returns
actuate.xtabanalyzer.UIOptions object.
Example
This example retrieves the user interface options and sets one of the UIOptions values.
actuate.XTabAnalyzer.getViewer
Syntax
Returns a viewer by container. To retrieve the viewer for the current object, do not specify a container. This function is useful to retrieve the instance ID for a specific viewer when there are multiple viewers on a page.
Parameters
String. The container instance ID from which to retrieve the object.
Returns
Example
This example retrieves the viewer.
actuate.XTabAnalyzer.getWidth
Syntax
Returns the width value of the viewer.
Returns
Example
This example retrieves the width of the viewer, then alters it based on the size.
actuate.XTabAnalyzer.getXTabBookmark
Syntax
Returns the bookmark name for the cross tab that was set by setXTabBookmark( ).
Returns
Example
This example retrieves the bookmark that the cross tab is associated with, changes the bookmark, and resets the bookmark. This functionality supports the use of multiple cross tab elements within a single design.
actuate.XTabAnalyzer.getXTabIid
Syntax
Returns the current instance ID of the crosstab analyzer. This function is useful in integration with the Interactive Viewer and supports the ability of the Interactive Viewer to obtain and use the cross tab instance ID.
Returns
Example
This example retrieves the cross instance ID.
actuate.XTabAnalyzer.isActive
Syntax
Returns true when a popup containing a cross tab analyzer is active and false in all other cases.
Returns
Example
This example checks if a viewer exists by checking two conditions: the viewer variable exists, or isActive( ) returns true. When both conditions fail, the example code creates a new viewer object within a container.
actuate.XTabAnalyzer.isDashboard
Syntax
Returns true when dashboard mode is active and false in all other cases.
Returns
actuate.XTabAnalyzer.registerEventHandler
Syntax
Registers an event handler for the specified event. This function throws actuate.xtabanalyzer.Exception when invalid arguments are passed.
Parameters
String. Specifies the event that triggers the handler call. For a list of supported events, see actuate.xtabanalyzer.EventConstants.
Function. Called when the event occurs.
Example
This example changes an event handler from one function to another.
viewer.removeEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, oldChangedHandler);viewer.registerEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, newChangedHandler);actuate.XTabAnalyzer.removeEventHandler
Syntax
Removes an event handler from the specified event. This function throws actuate.xtabanalyzer.Exception when invalid arguments are passed.
Parameters
String. Specifies the event from which to remove the event handler. For a list of supported events see actuate.xtabanalyzer.EventConstants.
Function. The function to deregister from the event.
Example
This example changes an event handler from one function to another.
viewer.removeEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, oldChangedHandler);viewer.registerEventHandler(actuate.xtabanalyzer.EventConstants.ON_CONTENT_CHANGED, newChangedHandler);actuate.XTabAnalyzer.reset
Syntax
Resets the viewer to its initial state.
Example
This example resets the viewer. All changes to the viewer made prior to this call are lost.
actuate.XTabAnalyzer.resizeTo
Syntax
Resizes the viewer to the specified height and width.
Parameters
Integer. The width to set the viewer to.
Integer. The height to set the viewer to.
Example
This example resizes the viewer when the new width is fewer than 1000 pixels and the new height is fewer than 650 pixels.
actuate.XTabAnalyzer.rollback
Syntax
Rolls back all changes in the viewer since the last commit( ) call and refreshes the viewer’s content. The value of ivMode must be true for rollback( ) to function.
Example
This example rolls back all changes to the viewer made since the last commit or submit function call.
actuate.XTabAnalyzer.setGadgetId
Syntax
Sets the cross tab gadget ID. This function is used for dashboard integration.
Parameters
String. The gadget ID of the cross tab.
Example
This example sets the gadget ID.
actuate.XTabAnalyzer.setHeight
Syntax
Changes the height of the viewer.
Parameters
Integer. The height to set the viewer to.
Example
This example retrieves the viewer’s current height. When the current height is fewer than 630 pixels, the example code doubles the viewer’s height.
actuate.XTabAnalyzer.setIVMode
Syntax
Sets IVMode for the viewer. Integrating a Data Analytics viewer with the Interactive Viewer affects the undo/redo feature. When set to true, all changes to the Data Analytics viewer must be committed as one transaction. The Interactive Viewer can undo or redo the entire batch.
Parameters
Boolean. Set to true if using IV mode.
Example
This example sets IVMode for the viewer.
actuate.XTabAnalyzer.setLeft
Syntax
Sets the position of the viewer’s left margin.
Parameters
Integer. The left margin for the viewer.
Example
This example retrieves the left margin of the viewer and moves the margin 20 pixels to the right when the margin is less than 45 pixels from the edge of the screen.
actuate.XTabAnalyzer.setOnClosed
Syntax
Sets a callback function to call when a viewer popup closes.
Parameters
Function. The function to call when the popup closes.
Example
This example checks to see if a popup window is active and sets a callback function to trigger when the popup closes.
actuate.XTabAnalyzer.setPosition
Syntax
Sets the CSS position attribute.
Parameters
String. The value for the CSS position attribute.
Example
This example changes the type of CSS positioning in use.
actuate.XTabAnalyzer.setReportletDocumentMode
Syntax
Set whether it is under Reportlet document mode
Parameters
actuate.XTabAnalyzer.setReportName
Syntax
Sets the report file name for the viewer. The file must be a document file.
Parameters
String. The name of the report file.
Example
This example initializes Data Analytics and opens a report file. The value of acviewer is the name of the <div> where the cross tab viewer appears.
actuate.XTabAnalyzer.setService
Syntax
Sets the Actuate web application URL. This function can request options for that URL.
Parameters
String. The URL of the Actuate web application.
actuate.RequestOptions object. Request options for the web application. This parameter is optional.
Example
This example sets the service and request options.
actuate.XTabAnalyzer.setSupportSVG
Syntax
Sets a flag indicating whether or not the browser supports SVG.
Parameters
Boolean. Flag indicating SVG support in the browser. This parameter’s value is true when the browser supports SVG and false in all other cases.
Example
This example returns the browser’s level of SVG support.
actuate.XTabAnalyzer.setTop
Syntax
Sets the top margin for the viewer.
Parameters
Integer. The top margin for the viewer.
Example
This example retrieves the current top margin for the viewer and moves the margin 20 pixels down the screen when the current position of the margin is fewer than 45 pixels from the top of the screen.
actuate.XTabAnalyzer.setUIOptions
Syntax
Sets the options available to the viewer
Parameters
Actuate.xtabanalyzer.uioptions object. The options object for the viewer.
Example
This example retrieves the user interface options and sets one of the UIOptions values.
actuate.XTabAnalyzer.setWidth
Syntax
Sets the width for the viewer.
Parameters
Integer. The width for the viewer.
Example
This example retrieves the width of the viewer. When the viewer is fewer than 630 pixels wide, the example code doubles the viewer’s width.
actuate.XTabAnalyzer.setXTabBookmark
Syntax
Sets a bookmark for the viewer.
Parameters
Example
This example retrieves the bookmark for the cross tab the viewer is associated with, changes the bookmark, and reloads the bookmark. This functionality enables the use of multiple cross tab elements within a single design.
actuate.XTabAnalyzer.setXTabIid
Syntax
Sets the instance ID for viewer rendering. This function is useful in integration with the Interactive Viewer, and supports the ability of the Interactive Viewer to obtain and use the cross tab instance ID.
Parameters
Example
This example sets the cross tab instance ID.
actuate.XTabAnalyzer.submit
Syntax
Submits requests to the server for the Data Analyzer viewer. This method triggers an AJAX request to submit all pending operations for this object. The server returns a response after processing the pending operations. The results render on the page in the Data Analyzer container. The submit( ) function throws an exception when another submit( ) operation is pending. A CONTENT_CHANGED event fires when the data analyzer content changes.
Parameters
Function. An optional function called when submit completes. This function receives the current XTabAnalyzer object as a parameter.
Example
This example retrieves the left margin of the viewer and expands the margin. The change does not take effect until submit( ) executes. The submit( ) function calls the function in the submitCallback parameter when submit( ) finishes executing. The callback function contains any processing that must occur after submit( ) finishes. Do not place such code after the submit( ) call because submit( ) is asynchronous.
(c) Copyright Actuate Corporation 2011 |
![]() |