T
- public class MultiPropertyModel<T>
extends org.apache.wicket.model.PropertyModel<T>
PropertyModel
allows set multiple expressions (properties) in a model.
The AbstractPropertyModel.getPropertyExpression()
is the primary expression applicable for AbstractPropertyModel.getObject()
, however a set process can be mapped to multiple expressions.
This helps in binding a component to multiple fields within the Object model.Constructor and Description |
---|
MultiPropertyModel(Object modelObject,
String expression)
Construct with a wrapped (IModel) or unwrapped (non-IModel) object and a property expression
that works on the given model.
|
MultiPropertyModel(Object modelObject,
String[] expressions)
Construct with a wrapped (IModel) or unwrapped (non-IModel) object and a property expressions[0]
that works on the given model.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getExpressions() |
org.apache.commons.collections.Predicate |
getFilter()
When setting multiple expressions, it maybe desired to filter which expressions should be used or not
based on runtime conditions on the object being set.
|
void |
setFilter(org.apache.commons.collections.Predicate filter)
When setting multiple expressions, it maybe desired to filter which expressions should be used or not
based on runtime conditions on the object being set.
|
void |
setObject(T object)
Applies the property expression on the model object using the given object argument.
|
String |
toString() |
public MultiPropertyModel(Object modelObject, String expression)
modelObject
- The model object, which may or may not implement IModelexpression
- Property expression for property accesspublic MultiPropertyModel(Object modelObject, String[] expressions)
modelObject
- The model object, which may or may not implement IModelexpressions
- Array of String Property expressions for property setting, where expressions[0] is specific for accesspublic void setObject(T object)
public String toString()
toString
in class org.apache.wicket.model.PropertyModel<T>
Object.toString()
public String[] getExpressions()
public org.apache.commons.collections.Predicate getFilter()
Predicate.evaluate(Object)
= true implies that the expression will not be setpublic void setFilter(org.apache.commons.collections.Predicate filter)
Predicate.evaluate(Object)
= true implies that the expression will not be setCopyright © 2018. All rights reserved.