1. I have a List<someDO> resultList; in my form bean.
2. In the jsp, I search based on certain criteria and in the action class, i set the the list in the form bean
3. Using <logic:iterate> i display the resultList in a table.
4. In each row of the table, I have an edit (link or button) .
5. On clicking the edit (link or button), I want to pass the whole object (DO) to the action class so that i can show a separate Edit jsp with all the corresponding values populated.
Include some data that will identify the DO in the link to the DO edit action. This is usually the primary key of the DO in the database. In the action which populates the DO edit form, read the DO from the database.
If you are using a component based framework like Wicket or Tapestry, you could write code like that, because they do a lot of 'magic' under the covers to hide the request - response nature of HTTP. But Struts or other action based frameworks don't provide this kind of functionality.
The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny GillTweets