Ok. Answered my own question, but should the TagUtils.getStack() check for an existing value stack in an existing ActionContext before creating one (which is, of course, empty)?

Turns out that the Webwork2 Tags extend WebWorkTagSupport and WebWorkBodyTagSupport and utilize an accessor that calls the TagUtils.getStack() method. My custom tags extended TagSupport/BodyTagSupport and were attempting to access the value stack via the ActionContext. The WW2 PropertyTag was using the TagUtils.getStack() which if the property "webwork.valueStack" is not in the request attributes will create one. Another one of my tags used the UrlHelper.buildUrl() method which accesses the valueStack from the ActionContext.

So there seems to be some inconsistency in terms of where you get a value stack. Am I missing a concept here or is this worth discussing? Thank you.

Fred.

Frederick N. Brier wrote:

Why would the value stack object change between tags in the same JSP? I am calling: ActionContext.getContext().getValueStack() in several tags. I print out the value each time:

1st tag: [EMAIL PROTECTED]
2nd tag: [EMAIL PROTECTED]
3rd tag: [EMAIL PROTECTED]

The tag classes extend the standard TagSupport. The 3rd tag is the Webwork2 PropertyTag (I stuck a Log INFO statement in it and rebuild). I have looked at the generated JSP source, but it is not apparent where this could be happening. Any thoughts as to how this could happen? Thank you.

Fred.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to