jodd.bean.loaders
Class RequestLoader

java.lang.Object
  extended byjodd.bean.loaders.RequestLoader
All Implemented Interfaces:
Loader

public class RequestLoader
extends java.lang.Object
implements Loader

Populates java bean from HttpServletRequest objects.

Names of requests parameters represents the names of bean properties. Values of requests parameters represents values of bean properties.

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.

BeanUtil.setProperty() will populate correctly target property.


Constructor Summary
RequestLoader()
           
 
Method Summary
 void load(java.lang.Object bean, java.lang.Object request)
          Loads values from given object into the bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestLoader

public RequestLoader()
Method Detail

load

public void load(java.lang.Object bean,
                 java.lang.Object request)
Description copied from interface: Loader
Loads values from given object into the bean.

Specified by:
load in interface Loader
Parameters:
bean - bean to populate
request - object to populate from


Jodd v0.24.5 Javadoc