This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes struts 2 example to have a link in one of the Iterated value in the JSP and pass it to an action Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "struts 2 example to have a link in one of the Iterated value in the JSP and pass it to an action" Watch "struts 2 example to have a link in one of the Iterated value in the JSP and pass it to an action" New topic
Author

struts 2 example to have a link in one of the Iterated value in the JSP and pass it to an action

chandru rajendran
Greenhorn

Joined: Jan 10, 2011
Posts: 5

hi,
i'm using struts2 and displayed values fetched from the database using <s:iterator>,

<s:iterator status="stat" value="List">
<tr>
<td><s:property value="#stat.index+1"></s:property></td>
<td><s:property value="%{name}"></s:property></td>
<td><s:property value="%{no}"></s:property></td>
<td><s:property value="%{address}"></s:property></td>
<td><s:property value="%{phone}"></s:property></td>
</tr>
</s:iterator>

i want to make the name property value as a link to call the action class with name being passed as a parameter, please give me some example...

Thanks a lot in advance,

Chandru Rajendran...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8263

Struts 2 has a url tag and an anchor tag that can be used together to create URL's with parameters like so:



"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
chandru rajendran
Greenhorn

Joined: Jan 10, 2011
Posts: 5

Thanks a lot Joe...

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: struts 2 example to have a link in one of the Iterated value in the JSP and pass it to an action
 
Similar Threads
List values are not bind with text fields
Label key value in struts2
Help in Debugging
iterate an object in struts-2
editing cells in table - not working