Menu (element)

From JRapid

Jump to: navigation, search

menu is an element, child of panel.


Contents

Description

The menu element includes an options menu that is generated based on the menu attribute of each entity in the project definition.



Every different value used for the menu attribute will produce a top level menu option. Every entity with the same value in its menu attribute will be placed as an option of that menu entry. When selected, this options open the default listing for the corresponding entity.

Usage

<panel
   ...
   <menu />
   ...
</panel>

Example

Note how every entity specifies the menu attribute and how the menu element is used in the [[panel (element)|panel.

    <panel name="Index" title="Default main page">
        <menu/>
        <header><h1>JRapid Project</h1></header>
        <footer><h4>Footer</h4></footer>
    </panel>

    <entity label="Company" menu="People" name="Company">
        <property display="primary" label="Name" name="name"/>
    </entity>

    <entity label="Person" menu="People" name="Person">
        <property display="primary" label="First Name" name="firstName"/>
        <property display="primary" label="Last Name" name="lastName"/>
    </entity>

    <entity label="Country" menu="Places" name="Country">
        <property display="primary" label="Name" name="name"/>
    </entity>

    <entity label="State" menu="Places" name="State">
        <property display="primary" label="Name" name="name"/>
        <property display="secondary" entity="Country" label="Country" name="country"/>
    </entity>

    <entity label="City" menu="Places" name="City">
        <property display="primary" label="Name" name="name"/>
    </entity>

    <entity label="Sale" menu="Sales" name="Sale">
        <property display="primary" entity="Company" label="Company" name="company"/>
        <property display="primary" label="Amount" name="amount" type="double"/>
    </entity>

    <entity label="Product" menu="Products" name="Product">
        <property display="primary" label="Name" name="name"/>
    </entity>

The resulting panel includes the generated menu.


Menu example‎

See also

Personal tools