org.apache.cocoon.forms.binding
Class CustomJXPathBindingBuilder

java.lang.Object
  extended byorg.apache.cocoon.forms.binding.JXPathBindingBuilderBase
      extended byorg.apache.cocoon.forms.binding.CustomJXPathBindingBuilder
All Implemented Interfaces:
BeanFactoryAware, JXPathBindingBuilder

public class CustomJXPathBindingBuilder
extends JXPathBindingBuilderBase
implements BeanFactoryAware

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 1304280 2012-03-23 11:18:01Z ilgrosso $

Nested Class Summary
 
Nested classes 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
 void setBeanFactory(BeanFactory beanFactory)
           
 
Methods inherited from class org.apache.cocoon.forms.binding.JXPathBindingBuilderBase
getCommonAttributes, 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

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
                    throws BeansException
Specified by:
setBeanFactory in interface BeanFactoryAware
Throws:
BeansException

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 interface JXPathBindingBuilder
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-2008 The Apache Software Foundation. All Rights Reserved.