John-
Rather than add(), we just use setString("name", "value"). You could also
do a remove("name") and then re-add it, but setString is probably a cleaner
way to go.
-Brian
On Fri, 08 Feb 2002 15:11:00 -0500
John Gillen <[EMAIL PROTECTED]> wrote:
> We are in the process of upgrading from Turbine v2.0 to v2.1 and have
> encountered a problem with the ParameterParser.add method. Under v2.0
> if add is invoked for a parameter that is already present in the
> parameter list, the old value is effectively replaced by the new value.
>
> This did not appear to work under v2.1 and a look at the source code
> reveals that add, now implemented in BaseValueParser, is simply a
> pass-through to append [likewise for v3]. So if the parameter is
> already present, an array of two values is created. Subsequently, if
> the "scalar" get method is used, the first (old) value is returned.
> This would seem to be a bug, albeit the JavaDoc is not explicit about
> the intended behavior of add.
>
> By the way, we use this mechanism to pass information from an action to
> a screen. The parameter in question is passed in via the URL and
> sometimes altered by an action, based on input from an HTML form. The
> screen then picks up the parameter via the RunData without concern for
> how it was set.
>
> Any comments on whether this is indeed a bug and/or whether there might
> be a better away to achieve the same effect?
>
> John Gillen
> Thoughtful Solutions, Inc.
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
brian lawler
branuity
617 front | v: 415.217.5052
san francisco 94111 | m: 415.307.5277
[EMAIL PROTECTED] | f: 415.217.5060
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>