org.apache.beehive.netui.util
Class ParamHelper

Object
  extended by ParamHelper

public class ParamHelper
extends Object

This class is used by NetUI tags that use parameters.


Constructor Summary
ParamHelper()
           
 
Method Summary
static void addParam(Map params, String name, Object value)
          Add a new parameter or update an existing parameter's list of values.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamHelper

public ParamHelper()
Method Detail

addParam

public static void addParam(Map params,
                            String name,
                            Object value)
Add a new parameter or update an existing parameter's list of values.

Implementation Note: in the case that a Map was provided for the value parameter, the this returns without doing anything; in any other case, params is updated (even in value is null).

If value is some object (not an array or list), the string representation of that object is added as a value for name. If the value is a list (or array) of objects, then the string representation of each element is added as a value for name. When there are multiple values for a name, then an array of Strings is used in Map.

Parameters:
params - an existing Map of names and values to update
name - the name of the parameter to add or update
value - an item or list of items to put into the map
Throws:
IllegalArgumentException - in the case that either the params

or name given was null