Feature Requests item #1443734, was opened at 2006-03-05 23:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1443734&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Priority: 5
Submitted By: flux c0d3r (fluxcoder)
Assigned to: Nobody/Anonymous (nobody)
Summary: Helper method add for ValueMap

Initial Comment:
I have an convience method for wicket.util.value.ValueMap.
It's an add method where you can add more
parameterValues for one key.:

public final Object add(final String key, final String
value)
{
   final Object o = get(key);
   if (o == null)
   {
       return put(key, new String[] {value});
   }
   else if(o.getClass().isArray() && Array.getLength(o)
> 0)
   {
       String destArray [] = new
String[Array.getLength(o)+1];
       System.arraycopy(o, 0, destArray, 0,
Array.getLength(o));

       destArray[destArray.length-1] = value;

       return put(key, destArray);
   }
   else
   {
       return put(key, new String[] {o.toString(), value});
   }
}

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684978&aid=1443734&group_id=119783


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to