• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Passing parameters

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic