aspose file tools*
The moose likes Struts and the fly likes submit problem with multiple forms and formbean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "submit problem with multiple forms and formbean" Watch "submit problem with multiple forms and formbean" New topic
Author

submit problem with multiple forms and formbean

Busty Sinclair
Greenhorn

Joined: Jun 06, 2002
Posts: 23
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
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
try after dis-associating formbean with jsp page
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4742
    
    7

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.


Junilu - [How to Ask Questions] [How to Answer Questions]
Busty Sinclair
Greenhorn

Joined: Jun 06, 2002
Posts: 23
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.
 
jQuery in Action, 2nd edition
 
subject: submit problem with multiple forms and formbean