Property (element)
From JRapid
property is an element, child of entity.
Contents |
Description
Entities are composed mainly of properties. Each property may be referred as a field in the entity's form, or a column in the entity's database table. Properties store values, collections of values, or relationships with other entities.
JRapid properties are defined by their type. This may be a built-in data type, such as string, integer or date, or it may be an entity-type.
Properties may specify many attributes that customize their behavior.
Usage
<property name = NAME label = LABEL style = STYLE description = DESCRIPTION tooltip = TOOLTIP cache = "cache"> unique = "unique" primarykey = "primarykey" enumset = ENUMSET required = "required" readonly = "readonly" widget = (select|combo|radio|selectmultiple|checkbox) comboproperty = PROPERTY maxlength = LENGTH minlength = MINLENGTH hint = "hint" class = CLASS display = (primary|secondary) type = (id|double|float|short|integer|long|boolean|string|text|longtext |richtext|enum|date|time|datetime|timerange|timequantity|file |password|image|email|phone|url|googledoc)> entity = ENTITY subset = SUBSET subsetparams = PARAMS collection = (set|list|sortedset) transient = "transient" embedded = (inline|detail|grid) labelposition = (left|top|fieldset) dimension = "row" | "column" childproperty = PROPERTY maxrows = ROWS minrows = ROWS listindex = LIST_INDEX listunique = LIST_UNIQUE setorder = SETORDER sort = SORT sortexpr = EXPR where = WHERE extendable = "extendable" sortable = "sortable" whennotinsubset = (donotshow|show|shownotvalid) default = DEFAULT expr = EXPR calculated = CALCULATED calculatedtrigger = (onload|onchange|onchangenew) formula = FORMULA displayif = CONDITION visibleif = CONDITION disabledif = CONDITION readonlyif = CONDITION checkif = CONDITION checkifmessage = MESSAGE displayproperties = PROPERTIES fixed = "fixed" hidden = "hidden" disabled = "disabled" invisible = "invisible" gridheader = "gridheader" gridvalue = "gridvalue" width = WIDTH height = HEIGHT imagecopyof = IMAGECOPYOF fromyear = FROMYEAR toyear = TOYEAR autosuggest = "autosuggest" rememberlast = "rememberlast" icon = PATH_TO_ICON pattern = PATTERN (restrict?, enum*, displaycondition?, visiblecondition?, readonlycondition?, disabledcondition?, suggest*, dynamicvalue*, foreach?, dynamicforeach?, action*) </property>
Example
- "string" properties.
The "string" type for a property is the default if no type is specified. The default widget for this kind of properties is a textfield without any validations.
Form widget | Java code | Hibernate mapping file | Database column | |
String type | ![]() |
![]() |
![]() |