Applet Object Model Reference

Related Topics

The SAP xApp Manufacturing Integration and Intelligence (SAP xMII) Java applets give the Web site developer a powerful set of interactive tools to help deliver application solutions through a browser.  Each applet follows a simple object model which must be understood in order to interact with the applet.  The object model is summarized in Figure 1.

Figure 1.

Each applet has a set of basic controls, and has two primary components, a display object and a query object.  Each of these objects has a series of parameters that determine their behavior, as shown in Figure 2.

Figure 2.

The display object types are:

  1. iGridComponent (used by iGrid applet)

  2. iTickerComponent (used by iTicker applet)

  3. iChartComponent (used by iChart applet)

  4. iSPCChartComponent (used by iSPCChart applet)

  5. iBrowserComponent (used by iBrowser applet)

Similarly, there are a number of query object types:

  1. TagQuery

  2. AlarmQuery

  3. SQLQuery

  4. XMLQuery

  5. AggregateQuery

  6. OLAPQuery

As you may have noticed, the query types match the query template types that may be created in SAP xMII.  The display templates correspond to the display template types.  Each template has many parameters, but the parameters have specific meanings depending on the template type.  A template is really a grouped set of parameters with specific values.  This is an easy way to develop default behaviors and easily reuse settings.  At the applet level, the templates are merely paths to get the underlying parameter values.  This is why you can override parameter values through applet tags and through script.  The parameter values themselves, and not the templates, direct the behaviour of the display and query objects.

When you are attempting to change the behaviour of an applet through Web script, you must know whether the behavior is related to the display object or the query object.  This is generally very simple.  If the behavior relates to the retrieval of data, you must address the query object.  How the applet looks and responds to user input is the display object's job.  

To address an applet parameter, you must generally address is at the display object or the query object level.  For example, if you want to ask a grid applet which is the selected column, you must first ask the applet to get the display object through the getGridObject() command, which will return an iGridComponent.  You then ask the display object for the selected column number with the  getSelectedColumn() command.

Similarly, if you wish to change the filter expression for the SQLQuery that is displayed in a grid, first ask the grid for the query object with the getQueryObject() command.  Then use the query object's setFilterExpr(String) command to set the new filter value.

The tree below has specific links to reference documents within the SAP xMII online help to help you navigate through the docs and find what you need.

Object Model Detailed Reference

The object model is a hierarchical model.  Each object inherits certain capabilities of its parent.  You must understand the hierarchy in order to fully take advantage of each object's capabilities.  For example, each query object is a child of a DataQuery object.  The DataQuery object has a number of built-in capabilities that each child inherits.  Each child (TagQuery, AlarmQuery, SQLQuery, XMLQuery) each has its own unique capabilities in addition to the capabilities of DataQuery.  Therefore, to understand the full exposed functionality of a TagQuery object, you must understand first all the capabilities and interfaces of a DataQuery object, and also the capabilities and interfaces of a TagQuery object.

The tree below contains hyperlinks to each specific class of objects, as well as representing the hierarchy of inheritance.  This tree should make it easier to find specific parameters, as well as parameter accessors, for each type of object.  For general information on scripting with SAP xMII applets, see the General Applet Reference and the Web Scripting with SAP xMII Objects guide.  A specific section is available on how to execute applet methods with Web script.

The display objects (iGridComponent, iChartComponent, and iTickerComponent) are shown in a separate branch of the hierarchy, because they do not inherit methods and properties from the applets.  However, to address an display object, you must ask the specific applet instance for the object instance it is using, as described in the Contained Objects section of the General Applet Reference.

Also note that the iCalendar object does not inherit any of the functionality of the SAP xMII Base Applet.