Relatedlisting (value of type)

From JRapid

Jump to: navigation, search

relatedlisting is a value of type attribute of action.


Contents

Description

The relatedlisting attribute associates the action to an entity list.

Usage

<action type="relatedentity" entity=ENTITY name=NAME label=LABEL 
        Optionals:{subset=SUBSET_NAME, subsetparams=PARAMS,defaulset=DEFAULSET_NAME,defaulsetparams=PARAMS,listing=LISTING_NAME}
/>

Example

 <property name="country" label="Country" entity="Country">
   <action label="Show provinces list" type="relatedlisting" entity="Province" subset="forCountry" subsetparams="country" />
 </property>
 <entity name="Province" label="Province">
   <subset name="forCountry">
     <param name="country" entity="Country" />
     <condition field="country" value="country" />
   </subset>
   <property name="name" label="Name" display="primary" />
   <property name="country" label="Country" entity="Country" />   
 </entity>

A country property has a relatedlisting action, which refers to a province entity. Then, all the provinces associated with the country are shown in a list.

See also

Personal tools