![]() |
|||||
|
Defining a GridThe following few lines of the UI config file define a Grid Tab: Example 4-11. Grid Tab Definition .
<!--Grid Tab Definition-->
<org.openmdx.ui1.ElementDefinition name="org:opencrx:kernel:segmentName:ClassName:referenceName">
<_object>
<active>true</active>
<toolTip>
<_item>ToolTip for TabA</_item>
</toolTip>
<label>
<_item>TabA</_item>
</label>
<order>
<_item>0</_item>
<_item>0</_item>
<_item>10</_item>
</order>
</_object>
<_content/>
</org.openmdx.ui1.ElementDefinition>
.The above code defines the following Grid Tab properties (and Figure 4-1 shows what the customized Grid looks like):
Without additional customization the Grid usually displays the first few attributes of an object, whereas the attributes are ordered by ascending order numbers (tab, fieldgroup, pos). If there is need to change that ordering for the purpose of changing the order in the Grid you can change the element definition of the relevant attributes. The following example shows, how one would move Attribute3 to the first position in the Grid by replacing the tag <order> with the tags <orderFieldGroup> and <orderObjectContainer>: Example 4-12. Field Ordering in the Grid .
<org.openmdx.ui1.ElementDefinition name="org:opencrx:kernel:segmentName:ClassName:Attribute3">
<_object>
<active>true</active>
<toolTip>
<_item>ToolTip for Attribute0</_item>
</toolTip>
<label>
<_item>Label0</_item>
</label>
<orderFieldGroup>
<_item>0</_item> <!-- tab -->
<_item>0</_item> <!-- group -->
<_item>10</_item> <!-- pos -->
</orderFieldGroup>
<orderObjectContainer>
<_item>0</_item> <!- pane -->
<_item>0</_item> <!- gridOrderNumber1 -->
<_item>1</_item> <!- gridOrderNumber2 -->
</orderObjectContainer>
</_object>
<_content/>
</org.openmdx.ui1.ElementDefinition>
.The Tabs in the Grid have a slightly different meaning than the Tabs in the Inspector, as each Tab in the Grid represents a reference defined in the UML model (remember that Tabs in the Inspector are defined by the customizer and mainly serve the purpose of structuring the attributes of an object). That is why you cannot "create" new Grid Tabs as a customizer. You can, however, change the order of these Tabs, you can (re)name them, or you can hide them. You can easily control the #attributes visible in the Grid and the #attributes available in the search menu by setting maxMember and showMaxMember to the desired values (see Figure 4-6 for details). The following few lines of the UI config file account.xml define a Grid Tab Accounts as shown in the figure above: Example 4-13. Grid Tab Definition with maxMember/showMaxMember .
<!--Grid Tab Definition with maxMember/showMaxMember -->
<org.openmdx.ui1.ElementDefinition name="org:opencrx:kernel:account1:Segment:account">
<_object>
<active>true</active>
<toolTip>
<_item>all Accounts</_item>
</toolTip>
<label>
<_item>Accounts</_item>
</label>
<order>
<_item>0</_item>
<_item>0</_item>
<_item>10</_item>
</order>
<maxMember>20</maxMember>
<showMaxMember>8</showMaxMember>
</_object>
<_content/>
</org.openmdx.ui1.ElementDefinition>
.
|
||||