skip to main content
TGO > Programmers documentation > Business objects and data sources > Off-page connectors > Loading an off-page connector defined in XML
 
Loading an off-page connector defined in XML
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");
For detailed information about data sources, see Data sources.
How to define an off-page connector in XML
The following is an example of an off-page connector defined in XML format. For details about the XML elements used in this example, see Elements in an XML data file .
 
<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:
Off-page connector displayed in a network component

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.