Layout (attribute of listing)

From JRapid

(Redirected from Layout)
Jump to: navigation, search

layout is an attribute of listing.


Contents

Description

The layout attribute indicates how to place the items of a listing.


Layout may take two values:

  • "simple": this is the default value and places the filters at the top of the listing, over the table that lists the records.
  • "left": the filters are placed at the left of the table with the records, one below the other.

Usage

<entity ... >
   <listing
      ...
      layout = "simple" | "left"
   />
</listing>

Example

Take a look at the definition of the companyListing in the following entity and how the layout change modifies how the listing os generated.

First, with a "simple" value.

    <entity label="Company" menu="People" name="Company">
        <listing layout="simple" name="companyListing"/>

        <filter display="primary" label="Name" name="filterName" property="name"/>
        <filter display="primary" label="Active" name="filterActive" property="active"/>

        <property display="primary" label="Name" name="name"/>
        <property display="secondary" label="Active" name="active" type="boolean"/>

        <action function="doSomehtingFunc" label="Do Something" location="button" name="doSomething" type="javascript"/>
    </entity>


Layout simple example‎


And now with a "left" value.

    <entity label="Company" menu="People" name="Company">
        <listing layout="left" name="companyListing"/>

        <filter display="primary" label="Name" name="filterName" property="name"/>
        <filter display="primary" label="Active" name="filterActive" property="active"/>

        <property display="primary" label="Name" name="name"/>
        <property display="secondary" label="Active" name="active" type="boolean"/>

        <action function="doSomehtingFunc" label="Do Something" location="button" name="doSomething" type="javascript"/>
    </entity>


Layout left example‎


See also

Personal tools