Defining a default value for a property
You define a default value for a property in an extension model file and then specify the default values in an extension data file.
About this task
To define a default value for a property, you specify the default value in an extension data file.
Note:
You can define a default value only on primitive type properties.
Procedure
To define a default value for a property:
Results
You have now defined a default value for a property.
Example
In XML, you create a default value for a property as follows:
- In the extension model file:
<class name="MyRule" extends="ActionRule"> <property name="score" type="Integer"/> </class> - In the extension data file:
<property-data name="score" defaultValue="10"/>