|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface DependsDeclares that a property depends on other one(s).
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.
| Required Element Summary | |
|---|---|
java.lang.String |
value
Comma separated list of the properties this property depend on. |
| Element Detail |
|---|
public abstract java.lang.String value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||