|
|
|
[
Permlink
| « Hide
]
Craig McClanahan - 09/Aug/02 12:58 AM
Extensions to the link tag will be addressed in a version of Struts after 1.1.
Marking all current RESOLUTION LATER issues to be against the Nightly Build.
Is there a patch available for Eric Fesler's extension?
***
***
Now that the html tags can recognize symbolic action names (
I've enhanced the <html:link> and <html:rewrite> tags to accept a new <html:param> tag which adds any *additional* parameters to the parent's parameters. So the old way works, the new way, and both together. <html:link action="editPersonAction" name="moreParamsMap"> <fmt:message key="person.title" /> <html:param name="param1" value="value1" /> <html:param name="param2">value2</html:param> </html:link> URL: http://svn.apache.org/viewvc?view=rev&rev=440206
Log: We've got into trouble in the past with tag pooling when attribute values are reset in the lifecycle methods of the tag. According to the servlet specification its up to the container when the attribute setters and reset methods are invoked - and the pooling strategy used is up to the implementation.
In the case of the ParamTag the "value" property is being (re)set in the doAfterBody() method when the value is specified in the body and I believe this breaks the specification, since its the responsibility of the container and not the tag to set attribute values. Introducing a new instance variable which is initialized to the "value" property in the doStartTag and reset in the doAfterBody method if the tag has a body would I believe ensure that this doesn't cause problems. IMO it would also be a good idea to add a new page to the struts-examples webapp - always useful to be able to test tag functionality and to be able to point users asking how to use this new feature. Thanks Niall. I figured out the problem after writing to the dev list. It turns out, as you said, it's totally up to the container when the tag is released from the pool. Although the JSP spec says it should happen after the page is finished, this is untrue, and other resources on the web confirm this.
What tripped me up was that there is a difference between properties and attributes. I had a variable not resetting because it wasn't exposed as an attribute. The container resets attributes (defined in TLD), but not internal properties which are your responsibility. That was my intention, but I didn't understand how I overlooked things. Now I do and things are fine. I'll check in the change soon. URL: http://svn.apache.org/viewvc?view=rev&rev=449579
Log: STR-746: Correctly clear internal property; minor consistency changes in subclassed tags. Author: pbenedict
Date: Sun Sep 24 23:10:36 2006 New Revision: 449581 URL: http://svn.apache.org/viewvc?view=rev&rev=449581 Log: STR-746: demonstrate nested param tags URL: http://svn.apache.org/viewvc?view=rev&rev=482910
Log: STR-746: EL+Nested versions of ParamTag and example Modified: struts/struts1/trunk/apps/el-example/src/main/webapp/html-link.jsp struts/struts1/trunk/el/src/main/resources/META-INF/tld/struts-html-el.tld struts/struts1/trunk/taglib/src/main/resources/META-INF/tld/struts-nested.tld Modified: struts/struts1/trunk/apps/el-example/src/main/webapp/html-link.jsp URL: http://svn.apache.org/viewvc?view=rev&rev=482911
Log: STR-746: EL+Nested versions of ParamTag and example Added: struts/struts1/trunk/el/src/main/java/org/apache/strutsel/taglib/html/ELParamTag.java (with props) struts/struts1/trunk/el/src/main/java/org/apache/strutsel/taglib/html/ELParamTagBeanInfo.java (with props) URL: http://svn.apache.org/viewvc?view=rev&rev=482912
Log: STR-746: Add SVN properties Modified: struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/ParamTag.java (contents, props changed) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||