Define readonly Properties
Question
Is there a keyword to define a property that can be created by a user but not modified after?
Answer
You can protect a property with the protected keyword. In this case it is recommended to use a default value (or set a value with a Drools rule after the content is created).
Another possibility would be to use the hidden keyword; this will hide the property in the edit dialog. In the Jahia repository explorer, you will have a possibility to display the hidden properties (to modify them).
Example of a definition:
[jnt:myNodeType] > jnt:content, jmix:basicContent, jmix:editorialContent
- text1 (string) = 'My default value!' protected
- text2 (string) = 'My Default value!' hidden