Herv� Guidetti wrote:
>
> Thanks but I stiil have a question.
>
> PP.add() exists but it does not take (String, Object) as parameters.
>
> Herv�
>
This is why people are using:
data.getUser().getTemp().put(String, Object)
or the context:
data.getTemplateInfo().getTemplateContext("VELOCITY_CONTEXT").put(...)
(or the "WEBMACRO_CONTEXT"). Many times (e.g. the $formatter) are
instantiated with the context as a parameter, and do not require
the awful (template engine dependant) path stated above.
I don't think the PP should deal with Objects, since the use of
it is HTML form oriented - which is *allways* Strings. Note that
the several add() overloads convert the parameter into a string!
It would flexible enough to serve as a Context, but since it contains
the stated arrays, it can't be one (theres no easy way to get
a specific item (via index) of an array in the template (I added
a ContextTool to do so).
I you wish, you can send a patch to do a PP.put(String, Object)
and see if it accepted is added to CVS. It does line up with
the many add(String, ...) overloads, and there is a getObject()
already (which I don't see used anywhere - and as stated above
all add methods convert to string).
> > 2nd: The ParameterParser should hide the contained Hashtable
> > instead of inheriting from it (same as the velocity.Context
> > does).
> Send a patch. :-)
> -jon
I will send a patch to hide the Hashtable used, since this
leads to the problem you originally stated - people trying
to use the put() method unsucessfully.
:) Christoph
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]