> From: "James Mitchell" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > <[EMAIL PROTECTED]> > Subject: Re: html:link and map of request parameters > Date: Mon, 7 Jun 2004 12:23:33 -0400 > > Here's how I do it: > (This demonstrates both static and dynamic values > for use with the > html:link) > > > ... > ... > <jsp:useBean id="myLinkParams" > class="java.util.HashMap"/> > <c:set target="${myLinkParams}" property="id" > value="${dto.id}"/> > <c:set target="${myLinkParams}" property="type" > value="edit"/> > > ...later down the page... > > <html:link action="/manageUserAccount" > name="myLinkParams"> > <bean:message key="edit.user.link.text"/> > </html:link>
http://jakarta.apache.org/struts/userGuide/struts-html.html#link " Specify only the name attribute - The named JSP bean (optionally scoped by the value of the scope attribute) must identify a java.util.Map containing the parameters " I looked at jakarta-struts-1.1-src's RequestUtils.computeParameters and saw that it uses a HashMap: // Create a Map to contain our results from the multi-value parameters Map results = null; if (map != null) { results = new HashMap(map); } else { results = new HashMap(); } I wish I was able to use a LinkedHaspMap in my useBean: <jsp:useBean id="myLinkParams" class="java.util.LinkedHaspMap"/> so the items I add to the Map appear in the same order in the rendered HTML. Is there anyway to have Struts adhere to the Map interface instead of forcing the object into a HashMap? - Ron __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]