|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.forms.binding.JXPathBindingBase
public abstract class JXPathBindingBase
Provides a base class for hooking up Binding implementations that use the Jakarta Commons JXPath package.
Field Summary | |
---|---|
protected Map |
classes
Cache of class definitions |
protected Binding |
parent
Parent binding of this binding. |
Constructor Summary | |
---|---|
protected |
JXPathBindingBase(JXPathBindingBuilderBase.CommonAttributes commonAtts)
|
Method Summary | |
---|---|
abstract void |
doLoad(Widget frmModel,
org.apache.commons.jxpath.JXPathContext jxpc)
Performs the actual load binding regardless of the configured value of the "direction" attribute. |
abstract void |
doSave(Widget frmModel,
org.apache.commons.jxpath.JXPathContext jxpc)
Performs the actual save binding regardless of the configured value of the "direction" attribute. |
Binding |
getClass(String id)
Gets a binding class. |
JXPathBindingBuilderBase.CommonAttributes |
getCommonAtts()
|
Library |
getEnclosingLibrary()
returns the local library for this tree of bindings |
String |
getId()
Returns binding definition id. |
String |
getLocation()
Gets source location of this binding. |
boolean |
isValid()
checks for deep validity of this binding tree (taking into accound included libraries) |
void |
loadFormFromModel(Widget frmModel,
org.apache.commons.jxpath.JXPathContext jxpc)
Redefines the Binding action as working on a JXPathContext Type rather then on generic objects. |
void |
loadFormFromModel(Widget frmModel,
Object objModel)
Hooks up with the more generic Binding of any objectModel by wrapping it up in a JXPathContext object and then transfering control over to the new overloaded version of this method. |
void |
saveFormToModel(Widget frmModel,
org.apache.commons.jxpath.JXPathContext jxpc)
Redefines the Binding action as working on a JXPathContext Type rather then on generic objects. |
void |
saveFormToModel(Widget frmModel,
Object objModel)
Hooks up with the more generic Binding of any objectModel by wrapping it up in a JXPathContext object and then transfering control over to the new overloaded version of this method. |
protected Widget |
selectWidget(Widget parent,
String id)
Helper method that selects a child-widget with a given id from a parent. |
void |
setEnclosingLibrary(Library lib)
sets the library this binding is a part of |
void |
setParent(Binding binding)
Sets parent binding. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Binding parent
protected Map classes
Constructor Detail |
---|
protected JXPathBindingBase(JXPathBindingBuilderBase.CommonAttributes commonAtts)
Method Detail |
---|
public Library getEnclosingLibrary()
Binding
getEnclosingLibrary
in interface Binding
Binding.getEnclosingLibrary()
public void setEnclosingLibrary(Library lib)
Binding
setEnclosingLibrary
in interface Binding
Binding.setEnclosingLibrary(org.apache.cocoon.forms.binding.library.Library)
public boolean isValid()
Binding
isValid
in interface Binding
Binding.isValid()
public JXPathBindingBuilderBase.CommonAttributes getCommonAtts()
public String getLocation()
public void setParent(Binding binding)
setParent
in interface Binding
binding
- Parent of this binding.public String getId()
getId
in interface Binding
public Binding getClass(String id)
Binding
getClass
in interface Binding
id
- Id of binding class to get.Binding.getClass(java.lang.String)
protected Widget selectWidget(Widget parent, String id)
parent
- containing the child-widget to return.id
- of the childWidget to find, if this is null
then the parent is returned.
RuntimeException
- if the id is not null and points to a
child-widget that cannot be found.public abstract void doLoad(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc) throws BindingException
BindingException
public final void loadFormFromModel(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc) throws BindingException
doLoad(Widget, JXPathContext)
depending on the configured value of the "direction" attribute.
BindingException
public final void loadFormFromModel(Widget frmModel, Object objModel) throws BindingException
loadFormFromModel
in interface Binding
BindingException
Binding.loadFormFromModel(org.apache.cocoon.forms.formmodel.Widget, java.lang.Object)
public abstract void doSave(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc) throws BindingException
BindingException
public final void saveFormToModel(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc) throws BindingException
doSave(Widget, JXPathContext)
depending on the configured value of the "direction" attribute.
BindingException
public void saveFormToModel(Widget frmModel, Object objModel) throws BindingException
saveFormToModel
in interface Binding
BindingException
Binding.saveFormToModel(org.apache.cocoon.forms.formmodel.Widget, java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |