I've added basic JSTL support to WebWork2. Actually, it's really not JSTL
support at all but rather the third use of the ww:property tag in WebWork
1.3. This tag is called ww:save-property (better names welcome!). It takes
the following params and has no body:

1) name - this is required and is the new name of the property (like @foo in
the old EL).
2) value - this is optional. If it is specified, this is an Ognl EL that is
used to find a value to be paired with the name. If it is not specified, the
top of the stack is used.
3) scope - this is optional and defaults to "webwork". Other choices are
"application", "session", "request", and "page".

If the scope is set as "webwork", then you can refer to the value for the
request of the request as "#name" where name is whatever you set in the tag.
This is part of Ognl and is just like "@name" in the old EL.

If you set the scope to "page", then the value is now usable by JSTL tags.
For example:

<ww:save-property name="world" scope="page"/>
Hello, <c:out value="${world.name}"/>

Will result in "Hello, world" assuming that the top of the stack is an
action with a getName() method that is returning "world". This is an
"active" way to do JSTL support and should get us started. I'm looking for
ways to automatically put the action classes in to the pageContext scope
using possibly their action aliases. This would pave the way, I hope, for
JavaServer Faces support, which I think would be a great addition if we have
the time.

-Pat




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to