Hi,

check out this JSP-snippet, that's how I do it:

  <logic:present name="<%= Constants.PROJECTS %>" scope="request">
    <logic:iterate id="project"
                   name="<%= Constants.PROJECTS %>"
                   scope="request">
      <tr align="left">
        <td><bean:write name="project" property="projectID"/></td>
        <td>
          <%
            HashMap linkParms = new HashMap();
            linkParms.put("sort", "bid");
            linkParms.put("projID", ((ViewProject)project).getProjectID());
            pageContext.setAttribute("linkParms", linkParms);
          %>
          <html:link page="/listProjectBugs.do" name="linkParms">
            <bean:write name="project" property="projectName"/>
          </html:link>
          <%
            pageContext.removeAttribute("linkParms");
          %>
        </td>
        <td><bean:write name="project" property="userRole"/></td>
        <td><bean:write name="project" property="managerName"/></td>
      </tr>
    </logic:iterate>
  </logic:present>

hope this helps
Alexander

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 16, 2001 9:46 AM
To: [EMAIL PROTECTED]
Subject: Links with two dynamic variables from bean


Hi all, 

I'd like to create a link with multiple parameters
retrieved from a bean. 

For example:
A bean called userBean contains id=3 and
name="Eric".
I would like to create the link:
test.do?userId=3&userName=Eric, but I don't know
how. I rather not want to create a map in my action
containing userId=3 and userName="Eric" since the user
beans are held in a vector which i iterate over in the
jsp.

Would be thankful for any help!
//Anna


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Reply via email to