Readonly (attribute of property)
From JRapid
The readonly attribute sets property‘s field in the form so that the user can read from them but not modify them.
Contents |
Usage
<property ... readonly="readonly" ... />
Example
Fields that calculate total prices by multiplying different fields are often set as readonly so as not to permit the user to modify it.
<property calculated="qty * unitaryPrice" readonly="readonly" label="Total Price" name="totalPrice" type="double"/>
The UI for a readonly field is the same, but you can edit the content.
More
Readonly doesn't apply to properties shown in "select" widgets:
- Boolean properties with "select" widget.
- Properties of type enum.
- Properties of type date, datetime and time with "selectdate" or "selecttime" widgets.
- Properties of type "Entity".
