java.lang.Object
org.scopemvc.view.util.BoundModel
org.scopemvc.view.util.ActiveBoundModel
- All Implemented Interfaces:
- org.scopemvc.core.ModelChangeListener
- public class ActiveBoundModel
- extends BoundModel
- implements org.scopemvc.core.ModelChangeListener
A BoundModel that handles ModelChangeEvents
and provides full two-way data-binding between a View and
its bound model property.
The parent View needs to implement
the ModelBindable interface to provide a generic
interface used by this delegate. An ActiveBoundModel registers
itself as a ModelChangeListener to the bound model object
so that it can update its parent View.
- Version:
- $Revision: 1.7 $ $Date: 2002/01/26 09:46:20 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final org.apache.commons.logging.Log LOG
view
protected ModelBindable view
- The ModelBindable View that delegates bound
Model handling to this helper.
manager
protected org.scopemvc.core.PropertyManager manager
- PropertyManager for the bound model.
ActiveBoundModel
public ActiveBoundModel(ModelBindable inView)
getPropertyManager
public org.scopemvc.core.PropertyManager getPropertyManager()
setBoundModel
public final void setBoundModel(java.lang.Object inModel)
- Overrides:
setBoundModel in class BoundModel
setSelector
public final void setSelector(org.scopemvc.core.Selector inSelector)
- Overrides:
setSelector in class BoundModel
modelChanged
public final void modelChanged(org.scopemvc.core.ModelChangeEvent inEvent)
- Update the parent View in response to the
passed ModelChangeEvent, if the event
reports that the property we
are bound to has changed.
- Specified by:
modelChanged in interface org.scopemvc.core.ModelChangeListener
getPropertyReadOnly
public boolean getPropertyReadOnly()
getPropertyValue
public java.lang.Object getPropertyValue()
getPropertyClass
public java.lang.Class getPropertyClass()
updateFromModel
public void updateFromModel(int inEventType)
- Calls parent View's
{org.scopemvc.view.util.ModelBindable#validationSuccess}
to clear any previous validation failure.
updateModel
public void updateModel()
- Put the current View contents into the bound model property.
Errors in getting the UI's new value into the model property
are handled by calling back into the parent View's
{org.scopemvc.view.util.ModelBindable#validationFailed}
with the Exception. On no errors, call the parent's
{org.scopemvc.view.util.ModelBindable#validationSuccess}