com.pow2.struts.forms
Class FormsUtil

java.lang.Object
  extended bycom.pow2.struts.forms.FormsUtil

public class FormsUtil
extends Object

FormUtil class

Author:
Luca Fossato

Constructor Summary
FormsUtil()
           
 
Method Summary
static void populate(org.apache.struts.action.ActionForm target, Object source)
          Transfer data from a source value object to a target ActionForm.
static void populate(Object target, org.apache.struts.action.ActionForm source)
          Transfer data from a source ActionForm to a target value object.
static void populate(Object target, Map sourceMap)
          Transfer data from a source Map to a target value object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormsUtil

public FormsUtil()
Method Detail

populate

public static void populate(Object target,
                            org.apache.struts.action.ActionForm source)
                     throws Exception
Transfer data from a source ActionForm to a target value object.
All that is required is that the names of the public properties correspond and that the properties be native types (or arrays of native types).
The wrapper objects, like Integer, are supported. Optional types, like Date, are not supported.

Parameters:
target - the target object that will receive the data from the source ActionForm
source - the source ActionForm that will send the data to the target object
Throws:
Exception - if any error occurs

populate

public static void populate(org.apache.struts.action.ActionForm target,
                            Object source)
                     throws Exception
Transfer data from a source value object to a target ActionForm.
All that is required is that the names of the public properties correspond and that the properties be native types (or arrays of native types).
The wrapper objects, like Integer, are supported. Optional types, like Date, are not supported.

Parameters:
target - the target ActionForm that will receive the data from the source object
source - the source object that will send the data to the target ActionForm
Throws:
Exception - if any error occurs

populate

public static void populate(Object target,
                            Map sourceMap)
                     throws Exception
Transfer data from a source Map to a target value object.
All that is required is that the names of the public properties correspond and that the properties be native types (or arrays of native types).
The wrapper objects, like Integer, are supported. Optional types, like Date, are not supported.

Parameters:
target - the target object that will receive the data from the source ActionForm
sourceMap - the Map object that provides the entire set of properties for which the specified bean provides a read method
Throws:
Exception - if any error occurs


Copyright © 2002-2004 Power Of Two S.R.L. All Rights Reserved.