|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Target(value={FIELD,METHOD})
public @interface PropertyValueEncapsulate the value for inject it in a property.
It's used to fill the values of a validator, calculator, etc before execute it.
Example:
@EntityValidator(validator=CheapProductValidator.class, properties= {
@PropertyValue(name="limit", value="100"),
@PropertyValue(name="description"),
@PropertyValue(name="price", from="unitPrice")
})
public class Product {
...
For example, in this case before executing the validation of CheapProductValidator
OpenXava does:
| Required Element Summary | |
|---|---|
java.lang.String |
name
The name of the property to fill. |
| Optional Element Summary | |
|---|---|
java.lang.String |
from
The property name of the the current object from when we obtain the data to fill the property of the target calculator, validator, etc. |
java.lang.String |
value
Fix value to fill the property of the target calculator, validator, etc. |
| Element Detail |
|---|
public abstract java.lang.String name
public abstract java.lang.String from
public abstract java.lang.String value
'value' is exclusive with 'from'
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||