org.apache.tapestry.valid
Class ValidatorBindingFactory

java.lang.Object
  extended by org.apache.tapestry.binding.AbstractBindingFactory
      extended by org.apache.tapestry.valid.ValidatorBindingFactory
All Implemented Interfaces:
BindingFactory

public class ValidatorBindingFactory
extends AbstractBindingFactory

Uses the tapestry.valid.ValidatorBeanFactory service to obtain configuration IValidator instances.

Since:
4.0
Author:
Howard M. Lewis Ship
See Also:
ValidatorBinding

Constructor Summary
ValidatorBindingFactory()
           
 
Method Summary
 IBinding createBinding(IComponent root, String bindingDescription, String expression, org.apache.hivemind.Location location)
          Creates and returns a ValidatorBinding.
 void setScriptSource(IScriptSource scriptSource)
           
 void setValidatorBeanFactory(org.apache.hivemind.lib.BeanFactory validatorBeanFactory)
           
 
Methods inherited from class org.apache.tapestry.binding.AbstractBindingFactory
getValueConverter, setValueConverter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorBindingFactory

public ValidatorBindingFactory()
Method Detail

setValidatorBeanFactory

public void setValidatorBeanFactory(org.apache.hivemind.lib.BeanFactory validatorBeanFactory)

setScriptSource

public void setScriptSource(IScriptSource scriptSource)

createBinding

public IBinding createBinding(IComponent root,
                              String bindingDescription,
                              String expression,
                              org.apache.hivemind.Location location)
Creates and returns a ValidatorBinding. Interprets the path as a bean initializer, used to locate a particular type of validator and a particular configuration of its properties.

Parameters:
root - the component that is the source of properties or messages (or etc.). When the path is "evaluated", the root component provides a context.
bindingDescription - The description of the binding.
expression - The expression used to get (or update) a value. The interpretation of this expression is determined by the type of IBinding created by this factory. In some cases, it is simple the name of an object contained by the root component. For the common "ognl:" binding prefix, it is an OGNL expression to be evaluated on the root object.
location - The location of the binding, used to report any errors related to the binding, or to the component parameter the binding is bound to.
Returns:
A IBinding instance for the specific expression given.


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.