• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

submit problem with multiple forms and formbean

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a page with two forms,
The problem is when I press the bottom forms submit button, the top form is submitted but to the action in the bottom form.
I have a formbean associated with the page and I think this is the cause, no matter what form I submit, it expects to submit an object of the type associated with the page, i.e. the form bean defined in struts.config.
Anyone any ideas?
thanks in advance
 
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try after dis-associating formbean with jsp page
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Form beans are associated with an Action via the name attribute in the action mapping in struts config.
My guess is that you have a problem in the html:form tag or in the struts-config. In the html:form tag make sure that you have the correct action specified. Cross-check that against the struts-config action mapping and make sure the name attribute is correct. Then go to the form definition and make sure that the correct form class is specified.
 
Busty Sinclair
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks you two,
I had quadruple checked the struts config info against the form info but no luck.
My mgr came to me this morning with a new design for the page layout again anyway and now the two forms are on diff pages so no prob!
B.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic