Package org.openxava.annotations
Annotation Type DefaultValueCalculator
-
@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface DefaultValueCalculator
For calculating its initial value.Applies to properties and references.
With
@DefaultValueCalculator
you can associate logic to a property or reference. This calculator is for calculating its initial value.
For example:@DefaultValueCalculator(CurrentYearCalculator.class) private int year;
In this case when the user tries to create a new Invoice (for example) he will find that the year field already has a value, that he can change if he wants to do.- Author:
- Javier Paniza
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class
value
Class with the logic for calculating the initial value, must implements ICalculator.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description PropertyValue[]
properties
Inject values to the properties of the calculator before calculating.
-
-
-
-
properties
PropertyValue[] properties
Inject values to the properties of the calculator before calculating.- Default:
- {}
-
-