You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy Cheng <an...@pos.st> on 2003/08/04 05:36:26 UTC

Newbie: Passing parameter using html:link, but how to get it back?

I have a JSP that contains a list of User bean, and I display that list
with all the attributes of the User bean.  I use literate tag to display
it
 
<logic:iterate id="bUser" offset="offset" length="length"
name="vUserList" indexId="rowNum" scope="request">
        <tr>
        <td><bean:write name="bUser" scope="page" property="IUserId"
/></td>
        <td><bean:write name="bUser" scope="page" property="SUserName"
/></td>
        <td><bean:write name="bUser" scope="page" property="SEmail"
/></td>
        <td><bean:write name="bUser" scope="page"
property="ISupervisorUserId" /></td>
        <td><html:link page="/UserDetail.do" paramName="bUser"
paramProperty="IUserId" paramId="UserId"> 
            Detail</html:link>
        </tr>
    </logic:iterate>
 
This is passed to /UserDetail action specified in the action mapping,
which then will forward the request to UserDetail.jsp.
 
<action path="/UserDetail"
type="com.apps.crm.web.actions.UserDetailAction">
<forward name="forwardUserLoaded" path="/UserDetail.jsp"
redirect="false" />
</action>
 
If I do the data access part in UserDetailAction, how can I retrieve the
UserId parameter that was specified from the link part in UserList.jsp?
 
Andy

Re: Newbie: Passing parameter using html:link, but how to get it back?

Posted by Rick Reumann <r...@reumann.net>.
On Mon, Aug 04,'03 (11:36 AM GMT+0800), Andy wrote: 
 
> If I do the data access part in UserDetailAction, how can I retrieve
> the UserId parameter that was specified from the link part in
> UserList.jsp?

request.getParameter("UserId"); 

-- 
Rick

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