org.apache.cocoon.forms.binding
Class CustomJXPathBindingBuilder

java.lang.Object
  extended by org.apache.cocoon.forms.binding.JXPathBindingBuilderBase
      extended by org.apache.cocoon.forms.binding.CustomJXPathBindingBuilder
All Implemented Interfaces:
LogEnabled

public class CustomJXPathBindingBuilder
extends JXPathBindingBuilderBase

CustomJXPathBindingBuilder provides a helper class for the Factory implemented in JXPathBindingManager that helps construct the actual CustomJXPathBinding out of the configuration in the provided configElement which looks like one of the following:

1. No additional configuration requirements:


 <fb:custom id="widget-id" path="xpath expression"
     class="your.package.CustomBindingX" />
 

2. With custom configuration requirements:


 <fb:custom id="widget-id" path="xpath expression"
     builderclass="your.package.CustomBindingXBuilder"
     factorymethod="makeBinding"
 >
   <fb:config custom-atts="someValue">
     <!-- in here come the nested custom elements (recommended in own namespace)
             that make up the custom config -->
   </fb:config>
 </fb:context>
 

Version:
$Id: CustomJXPathBindingBuilder.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.cocoon.forms.binding.JXPathBindingBuilderBase
JXPathBindingBuilderBase.CommonAttributes
 
Constructor Summary
CustomJXPathBindingBuilder()
           
 
Method Summary
 JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant)
          Builds the custom Binding class and wraps it into a CustomJXPathBinding
 
Methods inherited from class org.apache.cocoon.forms.binding.JXPathBindingBuilderBase
enableLogging, getCommonAttributes, getLogger, mergeCommonAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomJXPathBindingBuilder

public CustomJXPathBindingBuilder()
Method Detail

buildBinding

public JXPathBindingBase buildBinding(Element bindingElm,
                                      JXPathBindingManager.Assistant assistant)
                               throws BindingException
Builds the custom Binding class and wraps it into a CustomJXPathBinding

Specified by:
buildBinding in class JXPathBindingBuilderBase
Parameters:
bindingElm - configuration element describing the binding to build
assistant - helper-class for building possible nested bindings
Returns:
the freshly built binding based on the configuration element
Throws:
BindingException


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