Win a copy of Svelte and Sapper in Action this week in the 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Passing parameters

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm sing struts and I need to iterate some object and each object will have a link that pass the id of that object to a action like this:



this works fine, but the parameter to the action is hardcoded, I'd like to get it with

<bean:write name="car" property='<bean:write name="car" property="id"/>'/>


but it doesn't work, how can I pass the id to the parameter?


thanks
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the paramId and paramName attributes of the link tag:

http://struts.apache.org/1.1/userGuide/struts-html.html#link

- Brent
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic