Show TOC

Background documentationApplet Methods for Web Page Scripting Locate this document in the navigation structure

 

The following exposed methods or functions are available with all applets and/or their display and query objects. These functions can be called from Web page scripting using a syntax similar to document.appletName.method().

Name

Use

DataQuery getQueryObject()

Obtains a reference to the underlying query object that supplies data to the applet. Once a reference is obtained, its properties can be manipulated.

void refresh()

Updates the query to the current time and redraws the applet.

void setPropertyValue(String propertyName, String newValue)

Sets a named value that can be accessed by any applet during the browser session. Once the browser is closed, the value is no longer available. This can be used to create properties that can be passed between Web pages. For example, if you select a batch on one Web page, a new Web page with a detailed list of the materials consumed in the batch could appear. The batch number could be placed in a session parameter on the main page and picked up by the dialog box. These properties can also be used to pass values to SAP Manufacturing Integration and Intelligence (SAP MII) reports.

String getPropertyValue(String propertyName)

Gets a named value that was set using the setPropertyValue method. This value can be used to set the applet.

void showDetail()

Displays an HTML page in which the raw data associated with the current applet is displayed in a table.

void showHelp()

Displays the applet help.

void saveAsCSVFile()

Initiates a transfer of the raw data associated with the current chart to a local CSV file.

void showXMLDetail()

Displays an HTML page that contains an XML view of the raw data associated with the current applet.

void showDetailUsingGet()

Displays an HTML page in which the raw data associated with the current applet using HTML Get is displayed in a table.

String saveImage()

Gets the URL reference to the GIF representation of the image displayed by the applet; it is only supported by iGrid, iChart, and iSPCChart.

void showStatistics()

Displays an HTML page that contains the statistical metrics associated with the chart. It is only available when the underlying query is from a Tag connector.

void showCurrent()

Displays an HTML page that contains the values associated with the chart. It is only available when the underlying query is from a Tag connector.

boolean getSelectionEventEnabled()

void setSelectionEventEnabled(boolean newValue)

Gets and sets the property that enables a selection event on an applet. This method enables or disables the event through Web page scripting.

boolean getUpdateEventEnabled()

void setUpdateEventEnabled(boolean newValue)

Gets and sets the property that enables an update event on an applet. This method enables or disables the event through Web page scripting. You can use it to synchronize the scrolling of multiple applets.

Object createColor(String strColor)

Controls colors at runtime. The value of the strColor parameter can be a color name or an HTML color string in the format #RRGGBB. The returned color object can be assigned to a color property in an applet.

String colorToString(Color cColor)

Controls colors at runtime. A color property of an applet property can be converted to a string and used in HTML.

String encodeURLItem(String strItem)

Takes a string as an input and the URL encodes the string so it can be passed over the URL command line. The returned string has spaces and other unrecognized attributes replaced with URL codes.

String formatDate(String strDate, String fromFormat, String toFormat)

Reformats date/time strings. The parameters include the incoming date/time string, the incoming format (so the string can be properly parsed), and the outgoing format. The resulting date/time string is returned.

String formatNumber(double dValue, String sFormat)

Returns a string for the value in the specified format.