aspose file tools*
The moose likes Struts and the fly likes Can i have multiple ActionForms for multiple forms on one page? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Can i have multiple ActionForms for multiple forms on one page?" Watch "Can i have multiple ActionForms for multiple forms on one page?" New topic
Author

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

Henry Sun
Greenhorn

Joined: May 09, 2003
Posts: 18
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
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4991
    
    8

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?


Junilu - [How to Ask Questions] [How to Answer Questions]
Henry Sun
Greenhorn

Joined: May 09, 2003
Posts: 18
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can i have multiple ActionForms for multiple forms on one page?