David Graham wrote:
Personally, I think a custom tag would be overkill for something JSTL can handle pretty easily (assuming you're running in a JSP 1.2 container):
<jsp:useBean id="editParams" class="java.util.HashMap"/> <c:set target="${editParams}" property="action" value="prepareEditForm"/> <c:set target="${editParams}" property="accountId" value="${account.accountId}"/> <html:link action="/editAccountForm" name="editParams"> <c:out value="${account.systemName}"/> </html:link>
From a pure MVC perspective, I suppose you could argue that even that's an abuse of the view layer...
Not if you consider links to be part of the view ;-).
David
Sandeep Takhar wrote:
Not a bad idea to create a custom tag to do this for you either.
sandeep --- Carl Walker <[EMAIL PROTECTED]> wrote:
Here's an example where I make a URL with two parameters, 'action' and 'accountId'.
'account' is a pageContext-scoped variable put on the page by the logic:iterate tag.
<% HashMap editParams = new HashMap(); editParams.put("action", "prepareEditForm"); editParams.put("accountId", String.valueOf(((Account)account).getAccountId())); pageContext.setAttribute("editParams", editParams); %>
<html:link action="/editAccountForm.do" name="editParams"> <bean:write name="account" property="systemName" /> </html:link>
Giampiero De Ciantis wrote:
I am trying to use an <html:link> item to submit
some data, but I need to
send the value of 2 parameters. How do I assign
multiple parameters within
an <html:link> tag?
Thanks
-Gp
-- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/>
-- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

