Tab (element child of listing)
From JRapid
tab is an element, child of listing.
Contents |
Description
The tab element is used for including more than one view section in a listing.
Each tab can be set to use a different subset.
Tabs may also be used for showing crosstabs and charts.
Usage
<listing ... > <tab label = LABEL name = NAME subset = SUBSET crosstab = CROSSTAB chart = CHART /> </listing>
Example
Dividing listings into tabs is very simple. A tab element is created for each tab the listing should display, specifying a label, name and the subset that should be used, or the crosstab or chart attributes.
<entity defaultlisting="tabListing" label="Company" menu="People" name="Company" order="name">
<subset name="forBoston">
<condition field="city.name" value="'Boston'"/>
</subset>
<subset name="forL">
<condition field="name" like="'L%'"/>
</subset>
<subset name="forActiveCompany">
<condition field="active" value="true"/>
</subset>
<listing name="tabListing">
<tab label="All" name="all"/>
<tab label="Active" name="activeTab" subset="forActiveCompany"/>
<tab label="Boston" name="bostonTab" subset="forBoston"/>
<tab label="Starts L" name="startLTab" subset="forL"/>
</listing>
<property display="primary" label="Name" name="name"/>
<property label="Address" name="address" type="text"/>
<property display="secondary" entity="City" label="City" name="city"/>
<property display="secondary" label="Active" name="active" type="boolean"/>
<property display="secondary" label="Load Date" name="loadDate" type="date"/>
</entity>
<entity label="City" menu="Places" name="City" order="name">
<property display="primary" label="City" name="name"/>
<property display="secondary" label="Active" name="active" type="boolean"/>
</entity>
The above example generates the following listing.




