Package org.openxava.annotations
Annotation Interface Condition
Restricts the elements that appear in the collection.
Applies to collections.
You have full freedom to define how the collection data is obtained, with condition you can overwrite the default condition generated by OpenXava:
@Condition(
"${warehouse.zoneNumber} = ${this.warehouse.zoneNumber} AND " +
"${warehouse.number} = ${this.warehouse.number} AND " +
"NOT (${number} = ${this.number})"
)
If you have this collection within Carrier, you can obtain with this collection
all carriers of the same warehouse but not himself, that is the list of his
fellow workers. As you see you can use this in the condition in order to
reference the value of a property of current object.Since v7.7 you can use a filter to provide values for the condition arguments:
@Condition(value="${year} = ?", filter=ActiveYearFilter.class)
private Collection<Invoice> activeInvoices;
- Author:
- Javier Paniza
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements