Navigator items can easily be added. Behavior of editor and other parts can directly be changed from the navigator.

In this example, an item is added which provides a way to launch an List/Detail editor with a query of all customers of USA with new features.
Use modified query as shown in complete query page.

Add following XML lines where your want the new item to appear:

        <item label="List/Detail customers of USA" image="#IMG(adi://org.adichatz.engine/./IMG_QUERY.png)" id="customerUSAQUERY">
            <params>
                <param value="adi://myproject/./country" id="MESSAGE_BUNDLE"/>
                <param id="ICON_URI" value="platform:/plugin/org.adichatz.engine/resources/icons/IMG_QUERY.png"/>
                <param id="TITLE" value="List/Detail customers of USA"/>
                <param id="TOOL_TIP_TEXT" value="#MSG(adichatzGroupNavigator,customerQueryEditorToolTipText)"/>
                <param id="RESOURCE_BUNDLE" value="adi://myproject/./customer"/>
                <param xsi:type="listDetailContentProviderType" adiResourceURI="adi://myproject/model.customer/CustomerQUERY" id="CONTENT_PROVIDER" preferenceURI="preferenceName://usa"/>
                <param id="ADI_RESOURCE_URI" value="adi://org.adichatz.jpa/query/ListDetailQueryForm"/>
                <param id="TABLE_RESOURCE_URI" value="adi://myproject/model.customer/CustomerTI"/>
                <param id="DETAIL_RESOURCE_URI" value="adi://myproject/model.customer/CustomerDI"/>
                <param id="DUPLICATE_EDITOR" value="true"/>
                <param id="ADD_EDITOR_TOOLBAR" value="true"/>
            </params>
            <customizations>
                <tabular refreshAtStart="true" background="#COLOR(SWT.COLOR_TITLE_BACKGROUND_GRADIENT)" id="tableInclude:table"/>
                <sashForm id="ListDetailSashForm" orientation="SWT.HORIZONTAL" weights="3,1"/>
                <section id="detailInclude:detailContainer">
                    <listeners>
                        <listener listenerTypes="BEFORE_SYNCHRONIZE" id="beforeSynchronize">
                            <code>reinitLayout(controller, true);</code>
                        </listener>
                    </listeners>
                </section>
                <composite id="detailInclude:fieldsComposite">
                    <layout layoutConstraints="wrap 4" columnConstraints="[align right]10[grow,fill]25[align right]10[grow,fill]"/>
                </composite>
                <action id="masterDetailTBM:changeOrientationAction">
                    <listeners>
                        <listener listenerTypes="PRE_RUN" id="preRun">
                            <code>reinitLayout(controller, false);</code>
                        </listener>
                    </listeners>
                </action>
                <additionalCode>import org.adichatz.engine.controller.collection.SashFormController
import org.adichatz.engine.controller.AWidgetController
import org.eclipse.swt.SWT
import org.adichatz.engine.controller.collection.SectionController
import net.miginfocom.swt.MigLayout
private void reinitLayout(AWidgetController controller, boolean inverse) {
SashFormController sashFormController = (SashFormController) controller.getRootCore().getFromRegister("ListDetailSashForm");
SectionController sectionController = (SectionController) controller.getRootCore().getFromRegister("detailInclude:detailContainer");
if (null != sectionController.getControl()) {
    boolean horizontal = SWT.HORIZONTAL == sashFormController.getControl().getOrientation();
    horizontal = inverse ? !horizontal : horizontal;
    if (horizontal)
        sectionController.getComposite().setLayout(new MigLayout("wrap 4", "[fill, align right]10[fill,grow]25[align right]10[fill,grow]"));
    else
        sectionController.getComposite().setLayout(new MigLayout("wrap 2", "[fill, align right]10[fill,grow]"));
}}</additionalCode>
            </customizations>
        </item>

Remark:
The query 'adi://myproject/model.customer/CustomerQUERY' must contains all needed jointures (as address, address.city…) as shown in page complete query.

Explanations:
Lines 3-13: Lists needed parameters for launching the List/Detail part:

  • Line 8: use a specific content provider (listDetailContentProviderType), built for List/Detail architecture and use a variation of customerQUERY using USA preference (see complete query).
  • Line 11: a parameter must define the URI for detail part.


Lines 16-50: Defines new behavior on ui components:

  • Line 16: launch automatically query ending life cycle of the grid and set background color.
  • Line 17: SashForm orientation is horizontal (means divided vertically).
  • Lines 20-22: Listener for page layout reinitialization when section controller receives entity (section control is created just after this moment, it is null as long as no row is selected in the grid).
  • Line 26: Defines a new layout used by Detail part
  • Lines 30-32: Listener for page layout reinitialization after selecting action 'changeOrientationAction'.
  • Lines 35-50: the reinit layout code: When editor is vertically split, detail section contains 2 columns, when editor is horizontally split, detail section contains 4 columns.

renders the new layout:
 Customer List/Detail (customized)