Tab (element child of entity)

From JRapid

Jump to: navigation, search

tab is an element, child of entity.


Description

The "tab" element creates a tab grouping an entity‘s properties in the entity‘s form. It is used by enclosing properties by the <tab> tag.

Usage

 <tab name = NAME displayif = FPATH label = TEXT subset = SUBSET />
       ...
 </tab>
  1. name: Name by which the tab can be referenced.
  2. displayif: An FPATH expression that decides when to show this tab. See conditionals
  3. label: Label that will be shown on the tab.
  4. subset: Indicates the subset of data that will be displayed. It can only be used when the tab is included inside a listing.

Example

  • Grouping seller's properties into tabs.
    <entity label="Seller" menu="Sellers" name="Seller">
        <tab label="General" name="general">
            <row>
                <column>
                    <property display="secondary" label="Photo" name="photo" type="image"/>
                    <property label="Document" name="dni" type="integer"/>
                    <property dimension="row" display="primary" label="Name" name="name"/>
                    <property display="primary" label="Surname" name="surname"/>
                    <property label="Height" name="height" type="integer"/>
                    <property label="Weight" name="weight" type="integer"/>
                    <property formula="height / weight" label="BMI" name="bmi"/>
                    <property label="Birth" name="birthDate" type="date"/>
                    <property label="Phone" name="phone"/>
                    <property label="Cellphone" name="cellphone"/>
                    <property label="Email" name="email" type="email"/>
                    <property display="secondary" entity="SellerStatus" label="Status" name="status"/>
                    <property label="Role" name="charge"/>
                    <property entity="Area" label="Area" name="area"/>
                    <property label="Zone" name="zone" type="enum">
                        <enum value="U">Unica</enum>
                    </property>
                </column>
            </row>
        </tab>
        <tab label="Comments" name="comments">
            <property label="Comments" labelposition="top" name="comments" type="text"/>
        </tab>
        <tab label="Companies" name="companies">
            <embeddedlisting entity="Company" label="Companies" listing="companiesListing"
 name="companies" subset="forSeller" subsetparams="."/>
        </tab>
</entity>
Personal tools