How do I retrieve a business object from a view interaction?
In the case of the network and equipment views, as both of them extend IlpGraphView and as ItcCompositeGraphic implements IlpGraphic, you can use the method IlpGraphView::getRepresentationObject(IlpGraphic yourIltcCompositeGraphic).getIlpObject().
As the tree and table views do not have to deal with IlpGraphic, the business objects can be retrieved through their IlpGraphicView implementation. This interface offers two methods to retrieve the representation objects:
IlpGraphicView.getRepresentationObject(IlpPoint viewLocation), which returns the IlpRepresentationObject at the given position in this object.
IlpGraphicView.getRepresentationObjectSelectionModel(), which returns the IlpRepresentationObjectSelectionModel. You can use the getSelectedRepresentationObject()method of this interface to retrieve the representation object.
In general, as IlpGraphView implements IlpGraphicView, both of the above methods can also be employed to retrieve the business object from a representation object with any of the actual JTGO views using: SomeJTGOView.getRepresentationObjectSelectionModel().getSelectedRepresentationObject().getIlpObject().
IMPORTANT COMPATIBILITY NOTE: The method getRepresentationObject() is public and supported at the IlpGraphic (interface) level, but not at the IltcCompositeGraphic(implementation) level. So the graphic object should be manipulated at the IlpGraphic level and not at the IltcCompositeGraphic level. This means that, wherever the customer gets his graphic instance from, he should not cast it to IltcCompositeGraphic, but to an IlpGraphic. This will ensure that the code stays compatible in future versions of JViews TGO.