org.apache.cocoon.forms.binding
Class ValueJXPathBinding

java.lang.Object
  extended byorg.apache.cocoon.forms.binding.JXPathBindingBase
      extended byorg.apache.cocoon.forms.binding.ValueJXPathBinding
All Implemented Interfaces:
Binding, LogEnabled

public class ValueJXPathBinding
extends JXPathBindingBase

ValueJXPathBinding provides an implementation of a Binding that loads and saves the information behind a specific xpath expresion (pointing to an attribute or text-node) to and from a specific CForms widget as identified by its id.

Version:
$Id: ValueJXPathBinding.java 289538 2005-09-16 13:46:22Z sylvain $

Field Summary
 
Fields inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
classes, parent
 
Constructor Summary
ValueJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String widgetId, String xpath, JXPathBindingBase[] updateBindings, Convertor convertor, Locale convertorLocale)
          Constructs FieldJXPathBinding.
 
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 CForms-form-widget specified in this object.
 void doSave(Widget frmModel, org.apache.commons.jxpath.JXPathContext jxpc)
          Actively performs the binding from the CForms-form to the ObjectModel wrapped in a jxpath context
 void enableLogging(Logger logger)
          Receives the Avalon logger to use.
 Convertor getConvertor()
           
 Locale getConvertorLocale()
           
 String getFieldId()
           
 String getId()
          Returns binding definition id.
 ComposedJXPathBindingBase getUpdateBinding()
           
 String getXPath()
           
 String toString()
           
 
Methods inherited from class org.apache.cocoon.forms.binding.JXPathBindingBase
getClass, getCommonAtts, getLocalLibrary, getLocation, getLogger, isValid, loadFormFromModel, loadFormFromModel, saveFormToModel, saveFormToModel, selectWidget, setLocalLibary, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueJXPathBinding

public ValueJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
                          String widgetId,
                          String xpath,
                          JXPathBindingBase[] updateBindings,
                          Convertor convertor,
                          Locale convertorLocale)
Constructs FieldJXPathBinding.

Parameters:
convertor - may be null
Method Detail

getId

public String getId()
Description copied from class: JXPathBindingBase
Returns binding definition id.

Specified by:
getId in interface Binding
Overrides:
getId in class JXPathBindingBase

getUpdateBinding

public ComposedJXPathBindingBase getUpdateBinding()

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 CForms-form-widget specified in this object.

Specified by:
doLoad in class JXPathBindingBase
Throws:
BindingException

doSave

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

Specified by:
doSave in class JXPathBindingBase
Throws:
BindingException

toString

public String toString()

enableLogging

public void enableLogging(Logger logger)
Description copied from class: JXPathBindingBase
Receives the Avalon logger to use. Subclasses should always start with super.enableLogging(logger) in possible overriding versions.

Specified by:
enableLogging in interface LogEnabled
Overrides:
enableLogging in class JXPathBindingBase

getFieldId

public String getFieldId()

getXPath

public String getXPath()

getConvertor

public Convertor getConvertor()

getConvertorLocale

public Locale getConvertorLocale()


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.