File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts. How to submit ID of the selected object.

 
Stan Sokolov
Ranch Hand
Posts: 120
Hibernate IntelliJ IDE Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have table in JSP page that shows all users available in the system. I want to submit user_id of selected user to another Action. How can I do this ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Struts forum.
 
Junilu Lacar
Bartender
Pie
Posts: 6531
21
Java Linux Mac Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One common approach is to use a link. Assuming you have a User bean in some scope:

//
// attribute name: "userBean"
// bean: instance of User, and User.getUserId() == 1
//

<html:link action="myAction" paramId="id" paramName="userBean" paramProperty="userId">Link to other action</html:link>

This would render

<a href="myAction.do?id=1">Link to other action</a>
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic