jodd.bean.loader
Class RequestParamBeanLoader

java.lang.Object
  extended by jodd.bean.loader.BaseBeanLoader
      extended by jodd.bean.loader.RequestParamBeanLoader
All Implemented Interfaces:
BeanLoader

public class RequestParamBeanLoader
extends BaseBeanLoader

Populates object from servlet request parameters.

By java servlet specifications, parameter values are always String arrays (String[]). That is how they are sent to BeanUtil.setProperty(), except in case when this array contains just one String element. In that case it is sent as a single String.


Field Summary
protected  boolean trim
           
 
Fields inherited from class jodd.bean.loader.BaseBeanLoader
beanUtilBean
 
Constructor Summary
RequestParamBeanLoader()
           
RequestParamBeanLoader(boolean trim)
           
 
Method Summary
 void load(java.lang.Object bean, java.lang.Object source)
          Loads values from given source into the destination bean.
 
Methods inherited from class jodd.bean.loader.BaseBeanLoader
getBeanUtilBean, setBeanUtilBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trim

protected final boolean trim
Constructor Detail

RequestParamBeanLoader

public RequestParamBeanLoader()

RequestParamBeanLoader

public RequestParamBeanLoader(boolean trim)
Method Detail

load

public void load(java.lang.Object bean,
                 java.lang.Object source)
Description copied from interface: BeanLoader
Loads values from given source into the destination bean. All properties from source object will be iterated to be set into the destination.

Parameters:
bean - destination instance that will be populated
source - object to populate from


Copyright © 2003-2012 Jodd Team