How is the content created and updated?

The TLcySelectionEditorAddOn creates and shows the Object Properties panel for objects selected on the map. The panel itself is an ILcyApplicationPane while the panel content is an ILcyCustomizerPanel for a TLcyDomainObjectContext, or an array thereof if multiple objects are selected.

When the Object Properties panel is active, this add-on:

  • Listens to the selected objects on the map

  • Updates the content of the Object Properties ILcyApplicationPane each time the map selection is updated, by:

    • Creating a TLcyDomainObjectContext, or an array in the case of multiple selected elements

    • Using the ILcyCustomizerPanel.canSetObject method to check if the current customizer panel can handle the new selection — the TLcyDomainObjectContext. If it can, the current customizer panel is updated using the ILcyCustomizerPanel.setObject method.

    • If the current ILcyCustomizerPanel cannot handle the new selection, or there is no customizer panel yet, the add-on loops over all registered ILcyCustomizerPanelFactory instances at the back-end to find one that can create a customizer panel for the selection.

      If there is such a factory, it is asked to create a customizer panel and that customizer panel is used as content for the ILcyApplicationPane.

The add-on is responsible for creating the panel only. The actual content of the panel is created by ILcyCustomizerPanelFactory instances provided by other add-ons.

For example, the TLcyTreeTableViewAddOn plugs in such a factory that creates customizer panels with the properties of domain objects that implement the ILcdDataObject interface.

Customizing the contents

You can replace the default Object Properties panel for the objects of a certain format by plugging in an ILcyCustomizerPanelFactory for TLcyDomainObjectContext instances of that format.

When you are creating your own business data format using an ALcyFormat, the most obvious way to do this is by implementing the ALcyFormat.createDomainObjectCustomizerPanelFactories method. This is illustrated in the Adding support for custom editable data to a Lightspeed view and the Adding support for custom (editable) data to a GXY view tutorials.