• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing parameters  RSS feed

 
Mike Phillip
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
 
Brent Sterling
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!