Tab (element child of listing)

From JRapid

Jump to: navigation, search

tab is an element, child of listing.



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.


<listing ... >
        label = LABEL
        name = NAME
        subset = SUBSET
        crosstab = CROSSTAB
        chart = CHART


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="" value="'Boston'"/>
        <subset name="forL">
            <condition field="name" like="'L%'"/>
        <subset name="forActiveCompany">
            <condition field="active" value="true"/>
        <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"/>
        <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 label="City" menu="Places" name="City" order="name">
        <property display="primary" label="City" name="name"/>
        <property display="secondary" label="Active" name="active" type="boolean"/>

The above example generates the following listing.

Listing with tabs

Listing with tabs

Listing with tabs

Listing with tabs

See also

Personal tools