Grid (value of embedded)

From JRapid

(Redirected from Grid)
Jump to: navigation, search

grid is a value of embedded.

Other values are:



When a property is declared as embedded grid (must be a collection), the properties of the child entity are displayed as columns, adding extra columns for special tagged properties (see gridheader and gridvalue.


         name = NAME
         label = LABEL
         entity = ENTITY
         collection = COLLECTION
         embedded = (inline|detail|grid)
         childproperty = PROPERTY
         maxrows = ROWS
         minrows = ROWS
         listindex = LIST_INDEX
         listunique = LIST_UNIQUE
         setorder = SETORDER
         sort = SORT
         sortexpr = EXPR
         where = WHERE
         extendable = "extendable"
         sortable = "sortable"
         gridheader = "gridheader"
         gridvalue = "gridvalue" 
         displayproperties = PROPERTIES
         (foreach?, dynamicforeach?, ...)


Location-Precipitation grid

"Grid example"
<entity label="LocationPrecipitation" name="LocationPrecipitation">
     <property display="primary" label="Description" name="description"/>
     <property childproperty="locationPrecipitation" collection="set" embedded="inline"
     entity="LocationPrecipitationLine" label="Detail" name="detail"/>
<entity label="LocationPrecipitationLine" name="LocationPrecipitationLine">
     <property display="primary" entity="Location" fixed="fixed" label="Location"
     <property childproperty="locationPrecipitationLine" collection="set" 
     display="primary" embedded="grid" entity="PrecipitationRate" label="Precipitation"
     <property entity="LocationPrecipitation" hidden="hidden" name="locationPrecipitation"/>
<entity label="Precipitation" name="PrecipitationRate">
     <property display="primary" entity="Period" gridheader="gridheader" label="Period"
     <property display="primary" gridvalue="gridvalue" label="Rate" name="rate" type="double"/>
     <property entity="LocationPrecipitationLine" hidden="hidden"
<entity label="Period" name="Period">
     <property display="primary" label="Description" name="description"/>
<entity label="Location" name="Location">
     <property display="primary" label="Name" name="name"/>

Student-grades grid

In this example when the Student entity is embedded="inline" in another entity the grade property is set as row of the columns.

<entity label="Grade" name="Grade">
     <property display="primary" entity="Student" label="Student" name="student"/>
     <property display="primary" entity="Subject" fixed="fixed" gridheader="gridheader"
     label="Subject" name="subject"/>
     <property gridvalue="gridvalue" label="Grade" name="grade" type="double"/>
<entity label="Student" name="Student">
     <property entity="GradeReport" hidden="hidden" name="report" />
     <property childproperty="student" collection="set" embedded="grid" entity="Grade"
     label="Grades" name="grades" />

See also

Personal tools