• 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
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Sending multiple parameters using html:submit

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

is there a way to send multiple parameters when using html:submit this tag only gives the option to given a single parameter using property and value. However what can i do when i want to give multiple parameters. For instance the method to be executed (LookupDispatchAction) and a product id?

Thanks!!
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When the submit button is pressed on a form, all input tags and their values are sent as parameters to the servlet or JSP specified in the action attribute of the form. You can add any number of hidden input fields (using the html:hidden tag) to your form to pass whatever parameters you wish. If you need to change these values"on the fly" as the submit button is being pressed, you can specify a javaScript function in the onsubmit event of the form to modify them.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Theo,

Consider using CommandDispatchAction.

It allows you to specify the method and product id both in the button itself.
 
Replace the word "snake" with "danger noodle" in all tiny ads.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic