Patrick Lightbody wrote:

Open a jira issue for this, but I suspect it'll be a post 2.0 thing.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Ben Hall
Sent: Wednesday, November 12, 2003 12:05 AM
To: '[EMAIL PROTECTED]'
Subject: [OS-webwork] Parametized tags question

Hi,

Is it possible at all to add additional parameters to a tag without
using
the nested #param directive within Velocity ?

Currently, i'd do something like this:

#bodytag (Component "template=..")
  #param ("extraField" "value")
#end

Is it posible to do it somehow like this:

#tag (Component "template=.." "extraField='value'")

I'd basically like my extra field(s) to be available as $parameters
within
my template without bulking up my templates.

You can now :) Since the Component tag extends the ParameterizedTag (which has a getParams() method), the following is now legal:


#tag( Component "params.extraField='value'" )

There was an issue before with the order that attributes were applied in.

From your template, you can reference extraField as

$parameters.extraField ...

like other arguments to tag, the value associated with the parameter will be evaluated against the value stack.

M





-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to