Business Objects and Data Sources > Off-Page Connectors > Loading an Off-Page Connector Defined in XML

This section shows how to load an off-page connector from an XML file in a data source. For detailed information about data sources, see section Data Sources.

All you have to do is create a data source using the default data source implementation defined by IltDefaultDataSource and pass the XML file to the parse method of the data source, as follows:

dataSource = new IltDefaultDataSource();
dataSource.parse("OffPageConnectorXMLFile.xml");

Below is an example of an off-page connector defined in XML format. For details about the XML elements used in this example, see Table 3.1, Elements in an XML Data File.

How to Define an Off-Page Connector in XML
<addObject id="Region B">
  <class>ilog.tgo.model.IltOffPageConnector</class>
    <attribute name="name">Region B</attribute>
    <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint">
      <x>480</x> <y>200</y>
    </attribute>
    <attribute name="objectState"
            javaClass="ilog.tgo.model.IltOSIObjectState">
  <alarms>
    <new severity="Warning">4</new>
  </alarms>
    </attribute>
</addObject>

An off-page connector only displays alarm states to the exclusion of any other states such as primary states, secondary states, or statuses.

The following figure shows an off-page connector displayed in a network component:

images/offpinxml8.gif

Figure 10.1 Off-page Connector Displayed in a Network Component