The ParameterParser has a special use of Hashtable. It places
an array for each key into it and then adds the real object
to this array. This keeps the order when the same parameter
has been passed with multiple values (e.g. multiple selection
list in a HTML form).
1rst: Use the PP.add() and PP.append() methods to do what
you expect. You also could place the values in the (web)context
object. So do:
data.getParameters().add("theKey", myObject);
2nd: The ParameterParser should hide the contained Hashtable
instead of inheriting from it (same as the velocity.Context
does).
Hope this helped.
:) Christoph
Herv� Guidetti wrote:
>
> Hi,
>
> I need to keep an object at a place and I want that it will be reset/delete
> at each http request. I thought putting it in the ParameterParser but if I
> use :
> data.getParameters().put("theKey", myObject);
> it doesn't work because my Object turn to null.
>
> Why, does it happend ? I can't understand. ParameterParser extends Hashtable
> and this line works fine with an Hashtable.
>
> Do you have another solution to resolve my problem?
>
> Thanks a lot
>
> Herv�
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]