org.formaria.data.pojo
Class PersistentDataBindingContext

java.lang.Object
  extended by org.formaria.aria.DataBindingContext
      extended by org.formaria.data.pojo.PersistentDataBindingContext

public class PersistentDataBindingContext
extends DataBindingContext


Field Summary
protected  PersistenceController pojoContext
          A class used by Page to manage the pojo data binding coordination
protected  boolean startWorkUnit
           
 
Fields inherited from class org.formaria.aria.DataBindingContext
evaluator, modelBindings
 
Constructor Summary
PersistentDataBindingContext(DataBindingContext parent, PathEvaluator pathEvaluator)
          Creates a new PersistentDataBindingContext
 
Method Summary
 int saveBoundComponentValues()
          Save the component values to the model, opens a persitent unit of work if required
 boolean startWorkUnit()
          Gets whether the updating of the bindings should be bounded by the begining and end of a "peristent unit of work".
 void startWorkUnit(boolean state)
          Sets the value of the startWorkUnit property
 int updateBindings()
          Iterates all of the bindings in the page to relfect the model state, opens a persistent unit of work if required
 int updateBoundComponentValues()
          Update UI components with values from the model, opens a persistent unit of work if required
 
Methods inherited from class org.formaria.aria.DataBindingContext
addBinding, addBindingContext, getBinding, getBinding, getBindings, getParent, removeBinding, updateBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pojoContext

protected PersistenceController pojoContext

A class used by Page to manage the pojo data binding coordination

Copyright (c) Formaria Ltd., 2008
License: see license.txt


startWorkUnit

protected boolean startWorkUnit
Constructor Detail

PersistentDataBindingContext

public PersistentDataBindingContext(DataBindingContext parent,
                                    PathEvaluator pathEvaluator)
Creates a new PersistentDataBindingContext

Method Detail

updateBoundComponentValues

public int updateBoundComponentValues()
Update UI components with values from the model, opens a persistent unit of work if required

Overrides:
updateBoundComponentValues in class DataBindingContext
Returns:
non zero if errors are detected

updateBindings

public int updateBindings()
Iterates all of the bindings in the page to relfect the model state, opens a persistent unit of work if required

Overrides:
updateBindings in class DataBindingContext
Returns:
non zero if errors are detected

saveBoundComponentValues

public int saveBoundComponentValues()
Save the component values to the model, opens a persitent unit of work if required

Overrides:
saveBoundComponentValues in class DataBindingContext
Returns:
non zero if errors are detected

startWorkUnit

public boolean startWorkUnit()
Gets whether the updating of the bindings should be bounded by the begining and end of a "peristent unit of work".


startWorkUnit

public void startWorkUnit(boolean state)
Sets the value of the startWorkUnit property

Parameters:
true - if the "persistent unit of work" should be started before the bindings are updated, false otherwise