Package org.openxava.annotations
Annotation Type Calculation
-
@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface Calculation
Expression to do the calculation for a property.Applies to properties.
The expression can contain +, -, *, (), numeric values and properties names of the same entity. For example:
@Calculation("((hours * worker.hourPrice) + tripCost - discount) * vatPercentage / 100") private BigDecimal total;
You can note asworker.hourPrice
can be used to get value from references.The calculation is executed and displayed when the user changes any value of the properties used in the expression in the UI, however the value is not saved until the user clicks on save button.
- Since:
- 5.7
- Author:
- Javier Paniza
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
value
Expression with +, -, *, (), numeric values and other properties names of the same entity.
-