Example Code

The following sections contain code for an extremely simple custom property editor called rating-editor. This editor displays a number field and prevents the user from entering values greater than 10.

This property editor can be enabled for a field by entering the following mark-up in the content-type resource:

<field name="rating" type="number">
 <rating-editor xmlns="http://xmlns.escenic.com/2008/studio-plugin" enabled="true">
   <amount xmlns="http://xmlns.escenic.com/2008/studio-plugin">4</amount>
 </rating-editor>
</field>