File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic Data in form submission

 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Each row will contain a unique card id. I want to include that card id when the form is submiited. i have hard coded &card_id=1 but i want it to read something like



The above code should be on a single line.
How will you do this. The above code does not work. This is struts 1. The card ID will be then read from the action file and processed accordingly. I know this should work i think its only a matter of escaping bean:write.

Kind Regards.


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP 2.0 container: use EL. Pre-JSP 2.0 container: use the struts-el tags. Tags cannot be nested like that--illegal JSP.
 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please give me an example
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That said, I'm not a fan of putting parameters in a form tag--that's what form elements are for.
 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for this. But this isnt working. The jsp is just iterating over a arraylist and displaying them in a table. Each table has a seperate submit button. How do i know which card the submit button was pressed for. How to call the getter and setter method accordingly.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're already creating a separate form for each item--using a hidden form field seems the obvious solution.
 
Robert Darling
Ranch Hand
Posts: 100
Android Eclipse IDE Firefox Browser
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i do this.

Will this set the selectedIndex property in the cardForm ?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic