net.sourceforge.stripes.controller
Interface ActionBeanPropertyBinder

All Superinterfaces:
ConfigurableComponent
All Known Implementing Classes:
DefaultActionBeanPropertyBinder

public interface ActionBeanPropertyBinder
extends ConfigurableComponent

Interface for class(es) responsible for taking the String/String[] properties contained in the HttpServletRequest and:

Implementations may also perform validations of the fields during binding. If validation errors occur then the collection of ValidationErrors contained within the ActionBeanContext should be populated before returning.

Author:
Tim Fennell

Method Summary
 ValidationErrors bind(ActionBean bean, ActionBeanContext context, boolean validate)
          Populates all the properties in the request which have a matching property in the target bean.
 void bind(ActionBean bean, String propertyName, Object propertyValue)
          Bind an individual property with the name specified to the bean supplied.
 
Methods inherited from interface net.sourceforge.stripes.config.ConfigurableComponent
init
 

Method Detail

bind

ValidationErrors bind(ActionBean bean,
                      ActionBeanContext context,
                      boolean validate)
Populates all the properties in the request which have a matching property in the target bean. If additional properties exist in the request which are not present in the bean a message should be logged, but binding should continue without throwing any errors.

Parameters:
bean - the ActionBean to bind properties to
context - the ActionBeanContext containing the current request
validate - true indicates that validation should be run, false indicates that only type conversion should occur

bind

void bind(ActionBean bean,
          String propertyName,
          Object propertyValue)
          throws Exception
Bind an individual property with the name specified to the bean supplied.

Parameters:
bean - the ActionBean to bind the property to
propertyName - the name (including nested, indexed and mapped property names) of the property being bound
propertyValue - the value to be bound to the property on the bean
Throws:
Exception - thrown if the property cannot be bound for any reason


? Copyright 2005-2006, Stripes Development Team.