struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Jasnowski" <mjasn...@bea.com>
Subject RE: Any interest in a tag for URL parameters?
Date Tue, 01 Jul 2003 16:50:09 GMT
BTW, they have this same feature in the JSTL <url> tag.

-----Original Message-----
From: Christopher Bare [mailto:christopherbare@yahoo.com]
Sent: Tuesday, July 01, 2003 12:46 PM
To: struts-user@jakarta.apache.org
Subject: Any interest in a tag for URL parameters?


I'm thinking of coding up a new tag for the html tag
set called 'parameter' that could be nested inside the
<html:link> tag. Usage of this tag would be like these
examples:

<html:link page="/myaction.do"
  <html:parameter id="param1" name="mybean"
property="myproperty"/>
  <html:parameter id="param2" name="mybean"
property="myotherproperty"/>
  <html:parameter id="param3" value="literal-value"/>
</html:link>

<html:link>
  <html:parameter
id="wombatId"><foo:wombat/></html:parameter>
</html:link>

This would give you the ability to append an arbitrary
number of parameters to a URL while remaining purely
tag based. Also, you can specify the value of the
parameter using an application specific custom tag,
such as my wombat tag above.

Disadvantages are verbosity in the JSP, maintenance of
a new tag, and changes to existing code. It would
involve modifying the link tag to keep a Map of
parameters, and allow the inner tags to add to the
map, then build the URL in doEndTag(). Some
re-arrangement would be required of
RequestUtils.computeParameters(), which is already
fairly complicated. RequestUtils.computeParameters()
would have to accept the Map as a formal parameter or
pull it out of pageContext based on a defined key, if
the method signature can'tbe changed.

Does this seem worthwhile? Is it contraindicated for
some reason? Any thoughts?

Thanks,

-Chris





__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message