Fred Lamuette wrote:

As far as I am concerned this approach is not the correct one ! I explain my
point of view with an example :

With the latest XWork+WW2 cvs snapshot, you can write a select tag both ways
:

1/

#tag(Select "name='nameValue'" ...) -> in this case, the parameter with
key=name and value=stack.findValue("nameValue") is added to the parameters
map.

is equivalent to

#bodytag(Select )
        #param("name" "nameValue")  -> in this case, the parameter with key=name
and value=nameValue is added to the parameters map.
#end

2/

#tag(Select "name=nameValue" ...)

is equivalent to

#bodytag(Select )
        #param("name" "$stack.findValue($nameValue)")
#end

--------
You can admit it's not very coherent, you have two different behaviors
according to what you use (extra tags or external params) whereas the same
handling behind is used (extra tags are converted as parameters).

I don't think we would ever recommend that anyone use style 2/.


The intent is that params passed in on the #tag line are all resolved via OGNL, those passed in through #param are not. #param was intended to allow developers to pass raw objects into the tag for rendering.

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