@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface Depends
Applies to properties.
OpenXava uses this info in order to know when to recalculate
values of a property in the user interface.
Example:
@Depends("unitPrice") public BigDecimal getUnitPriceInPesetas() { if (unitPrice == null) return null; return unitPrice.multiply(new BigDecimal("166.386")).setScale(0, BigDecimal.ROUND_HALF_UP); }In this case if the unitPrice changes in the user interface, the value of unitPriceInPesetas is recalculated and redisplayed.
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
value
Comma separated list of the properties this property depend on.
|