|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.echobinding.binding.AbstractBindingContext net.sf.echobinding.binding.OgnlBindingContext
public class OgnlBindingContext
Field Summary | |
---|---|
static java.lang.String |
OGNL_NAMESPACE_PMOD
The OGNL namespace/prefix used to access the presentation model. |
Fields inherited from class net.sf.echobinding.binding.AbstractBindingContext |
---|
_adapters, _changes |
Constructor Summary | |
---|---|
OgnlBindingContext()
Creates a new OgnlBindingContext. |
|
OgnlBindingContext(java.lang.Object bean)
Creates a new OgnlBindingContext. |
Method Summary | |
---|---|
BindingContext |
add(java.lang.String id,
PropertyAdapter adapter)
Adds a property adapter to the context. |
OgnlBindingContext |
addModel(java.lang.String contextName,
java.lang.Object bean)
Adds a bean to the OgnlContext. |
BindingContext |
createChild()
Creates a new BindingContext instance and adds it as a child to this context. |
OgnlPropertyAdapter |
getAdapter(java.lang.String id)
Returns the PropertyAdapter for the given id. |
java.util.HashMap<java.lang.String,java.lang.Object> |
getContextMap()
Returns the context map. |
java.lang.Object |
getModel()
Returns the model. |
protected ognl.OgnlContext |
getOgnlContext()
|
ValidationHandler |
getValidationHandler()
Returns the ValidationHandler for this context. |
ValidationHandler |
getValidationHandler(java.lang.String id)
Returns the ValidationHandler for a specific binding. |
java.lang.Object |
getValue(java.lang.String id)
Returns the value for the specified adapter. |
boolean |
isDirty(java.lang.String id,
java.lang.Object value)
Checks if the given value equals the value in the bean. |
void |
setContextMap(java.util.HashMap<java.lang.String,java.lang.Object> contextMap)
Sets the context map. |
OgnlBindingContext |
setModel(java.lang.Object bean)
Sets the model to be used. |
void |
setPresentationModel(PresentationModel presentationModel)
Sets the presentation model. |
BindingContext |
setValidationHandler(ValidationHandler handler)
Sets the ValidationHandler for this context. |
void |
setValue(java.lang.String id,
java.lang.Object value)
Sets the value for the specific adapter. |
ValidationReport |
validate(java.lang.String id,
java.lang.Object value)
Checks if the value is valid for the specified adapter. |
Methods inherited from class net.sf.echobinding.binding.AbstractBindingContext |
---|
addChild, addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getChilds, getControl, getControls, getDecorator, getFormat, getParent, getPresentationModel, getPropertyAdapters, isDirty, isValid, propertyChange, registerControl, remove, removeChild, removeControl, removePropertyChangeListener, removePropertyChangeListener, setChilds, setParent, synchronize, update, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OGNL_NAMESPACE_PMOD
Constructor Detail |
---|
public OgnlBindingContext(java.lang.Object bean)
bean
- The beanpublic OgnlBindingContext()
Method Detail |
---|
public BindingContext add(java.lang.String id, PropertyAdapter adapter)
BindingContext
add
in interface BindingContext
add
in class AbstractBindingContext
id
- the adapter idadapter
- the adapter
public java.lang.Object getValue(java.lang.String id) throws BindingException
BindingContext
id
- the id
BindingException
- the binding exceptionpublic void setValue(java.lang.String id, java.lang.Object value) throws BindingException
BindingContext
id
- the idvalue
- the value
BindingException
- the binding exceptionpublic ValidationReport validate(java.lang.String id, java.lang.Object value)
BindingContext
id
- the idvalue
- the value
public java.lang.Object getModel()
BindingContext
public OgnlBindingContext setModel(java.lang.Object bean)
BindingContext
bean
- the bean
public void setPresentationModel(PresentationModel presentationModel)
BindingContext
setPresentationModel
in interface BindingContext
setPresentationModel
in class AbstractBindingContext
presentationModel
- The presentationModel to set.public OgnlBindingContext addModel(java.lang.String contextName, java.lang.Object bean)
contextName
- bean
-
public BindingContext createChild()
BindingContext
public java.util.HashMap<java.lang.String,java.lang.Object> getContextMap()
protected ognl.OgnlContext getOgnlContext()
public void setContextMap(java.util.HashMap<java.lang.String,java.lang.Object> contextMap)
contextMap
- public ValidationHandler getValidationHandler(java.lang.String id)
BindingContext
ValidationHandler
for a specific binding. If
no ValidationHandler
exists for the binding, the
ValidationHandler
of the context should be returned.
id
- the id
public BindingContext setValidationHandler(ValidationHandler handler)
BindingContext
ValidationHandler
for this context.
handler
- the handler
public ValidationHandler getValidationHandler()
BindingContext
ValidationHandler
for this context.
public boolean isDirty(java.lang.String id, java.lang.Object value) throws BindingException
BindingContext
id
- the idvalue
- the value
BindingException
- the binding exceptionpublic OgnlPropertyAdapter getAdapter(java.lang.String id)
PropertyAdapter
for the given id. If no adapter for
this id exists, a new adapter will be lazely generated using the id as
binding expression. The newly generated adapter will added to he list of
adapters.
id
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |