Comboproperty (attribute of property)

From JRapid

Jump to: navigation, search

comboproperty is an attribute of property.


Contents

Description

The comboproperty is a required attribute when using the combo value for the widget attribute of a property.

The value for this attribute specifies the property in the related entity that will be used to filter the matching records.

A default property to be used as comboproperty for an entity can be defined using the comboproperty attribute of entity. This allows the developer to set a default comboproperty to be used for any combo widget that references that entity.

Usage

<property label=LABEL name=NAME entity=ENTITY widget="combo"
     comboproperty=PROPERTY_OF_RELATED_ENTITY/>

Example

A Company entity specifies a "responsible" property of entity type "Seller". The value combo is used for the widget attribute in that property. The comboproperty is set to "lastName" so that end-users will restrict the dataset suggested for the "Responsible" property by typing the Seller's last name.

 <entity label="Company" menu="Company" name="Company">
     ...
     <property label="Responsible" name="responsible" entity="Seller" widget="combo"
     comboproperty="lastName" />
 </entity>
 <entity label="Seller" menu="Sellers" name="Seller">
     <property display="primary" label="Name" name="name" required="required" />
     <property display="primary" label="Last Name" name="lastName" required="required" />
     <property display="secondary" label="Active" name="active" type="boolean" />

     <filter display="primary" flag="like" label="Last Name" name="lastName" property="lastName" />
 </entity>

Widget combo example‎

See also

Personal tools