> -----Original Message-----
> From: Michael James [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 19, 2003 4:42 PM
> To: [EMAIL PROTECTED]
> Subject: Parameter styles with multiple values
>
>
> Hi,
>
> I'm trying to implement a parameter style that allows
> the user to
> select multiple items in a list. The list is populated with
> data from
> a database.
I have a similar problem and I've given up on it. But that doesn't mean
that you shouldn't keep trying and tell me if you found a solution ;-)
(But see below for more information.)
> The Velocity template that accompanies the parameter
> style generates a
> list of the format:
>
> <select name="listname" size="5" multiple="multiple">
> <option selected>value1</option>
> <option>value2</option>
> <option selected>value3</option>
> ...
> </select>
>
> From what I understand, when a list with multiple
> selections (like the
> HTML above) is submitted in a form, the values are multiple
> values are
> comma-separated. So for the list above, the submitted form
> would have
> the following line:
>
> listname=value1,value3
No, the request looks like this:
listname=value1&listname=value3
This is how multiple values are encoded. To read multiple values from a
request, you can do rundata.getParameters().getStrings("listname"). This
returns a String array of all values.
rundata.getParameters.getString("listname") only returns the first value
of a multivalue parameter. If I understand correctly, this is how
Jetspeed reads the parameters in CustomizeAction.doUpdate() (where I
think the customize requests are handled), at least in b4, I don't know
about the newest CVS version.
So I think that at the moment, you cannot use dynamic multiple values
with parameter styles :-(
Cheers
--
Holger Dewes
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]