Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Greenhorn
Posts: 5
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts 2 has a url tag and an anchor tag that can be used together to create URL's with parameters like so:

 
chandru rajendran
Greenhorn
Posts: 5
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Joe...

 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic