Grid (value of embedded)
From JRapid
Other values are:
Contents |
Description
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.
Usage
<property 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?, ...) </property>
Examples
Location-Precipitation grid
<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>
<entity label="LocationPrecipitationLine" name="LocationPrecipitationLine">
<property display="primary" entity="Location" fixed="fixed" label="Location"
name="location"/>
<property childproperty="locationPrecipitationLine" collection="set"
display="primary" embedded="grid" entity="PrecipitationRate" label="Precipitation"
name="precipitation"/>
<property entity="LocationPrecipitation" hidden="hidden" name="locationPrecipitation"/>
</entity>
<entity label="Precipitation" name="PrecipitationRate">
<property display="primary" entity="Period" gridheader="gridheader" label="Period"
name="period"/>
<property display="primary" gridvalue="gridvalue" label="Rate" name="rate" type="double"/>
<property entity="LocationPrecipitationLine" hidden="hidden"
name="locationPrecipitationLine"/>
</entity>
<entity label="Period" name="Period">
<property display="primary" label="Description" name="description"/>
</entity>
<entity label="Location" name="Location">
<property display="primary" label="Name" name="name"/>
</entity>
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>
<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" />
</entity>
