• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Can i have multiple ActionForms for multiple forms on one page?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, friends,
I have a page which will perform multiple different functions in it, such as update product quantity, calculate shipping cost. Each function has its own form. I am wondering, can I use different ActionForms for the different forms on the same page and if any error, will the page display the error for the associated field on the associated form?
Thanks.
henry
 
Marshal
Posts: 15630
264
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why not. As long as you keep the document well-formed (forms can't overlap each other), you should be fine. I'm assuming that either you have each form have its own set of submit button(s) or if not, you are using JavaScript to submit forms. I prefer the former approach though.
As for displaying error messages, you have almost total control over how and where the messages will be displayed. Are you encountering any specific problems with using the tags?
 
Henry Sun
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply. I have different submit button in the page. So there should be no problem for my issue. I'll test it this afternoon.
henry
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic