org.apache.cocoon.forms.binding
Class ContextJXPathBinding

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.forms.binding.JXPathBindingBase
          extended byorg.apache.cocoon.forms.binding.ComposedJXPathBindingBase
              extended byorg.apache.cocoon.forms.binding.ContextJXPathBinding
All Implemented Interfaces:
Binding
Direct Known Subclasses:
GroupJXPathBinding, StructJXPathBinding

public class ContextJXPathBinding
extends ComposedJXPathBindingBase

ContextJXPathBinding provides an implementation of a Binding that narrows the binding scope to some xpath-context on the target objectModel to load and save from.

Version:
$Id: ContextJXPathBinding.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
classes, parent
 
Constructor Summary
ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String contextPath, JXPathBindingBase[] childBindings)
          Constructs ContextJXPathBinding for the specified xpath sub-context
ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String contextPath, String factoryClassName, JXPathBindingBase[] childBindings)
          Constructs ContextJXPathBinding for the specified xpath sub-context and optional JXPath factory class.
 
Method Summary
 void doLoad(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc)
          Actively performs the binding from the ObjectModel wrapped in a jxpath context to the CocoonForm.
 void doSave(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc)
          Actively performs the binding from the CocoonForm to the ObjectModel wrapped in a jxpath context.
 String getFactoryClassName()
           
 String getXPath()
          To allow child classes to know which path they bind to
 String toString()
           
 
Methods inherited from class org.apache.cocoon.forms.binding.ComposedJXPathBindingBase
getChildBindings, getClass
 
Methods inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
getCommonAtts, getEnclosingLibrary, getId, getLocation, isValid, loadFormFromModel, loadFormFromModel, saveFormToModel, saveFormToModel, selectWidget, setEnclosingLibrary, setParent
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContextJXPathBinding

public ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
                            String contextPath,
                            JXPathBindingBase[] childBindings)
Constructs ContextJXPathBinding for the specified xpath sub-context


ContextJXPathBinding

public ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
                            String contextPath,
                            String factoryClassName,
                            JXPathBindingBase[] childBindings)
Constructs ContextJXPathBinding for the specified xpath sub-context and optional JXPath factory class.

Method Detail

getFactoryClassName

public String getFactoryClassName()

doLoad

public void doLoad(Widget frmModel,
                   org.apache.commons.jxpath.JXPathContext jxpc)
            throws BindingException
Actively performs the binding from the ObjectModel wrapped in a jxpath context to the CocoonForm.

Overrides:
doLoad in class ComposedJXPathBindingBase
Throws:
BindingException

doSave

public void doSave(Widget frmModel,
                   org.apache.commons.jxpath.JXPathContext jxpc)
            throws BindingException
Actively performs the binding from the CocoonForm to the ObjectModel wrapped in a jxpath context.

Overrides:
doSave in class ComposedJXPathBindingBase
Throws:
BindingException

getXPath

public String getXPath()
To allow child classes to know which path they bind to

Overrides:
getXPath in class ComposedJXPathBindingBase

toString

public String toString()


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.