Instantiating multiple forms in a single action
2 posts in topic
Flat View  Flat View

Posted By:   Kiran_Vasu
Posted On:   Tuesday, January 8, 2002 12:39 PM

Hi, We are developing an application that pulls up all the user information (contact info and trivia info) on login and have links to actions that allow the user to individually edit each category of info. Each category has its own form.

In the action for displaying the collective info from all categories we are trying to instantiate each individual form and populating them and putting them in scope. On the JSP we are using <bean:write> tag to print out each value from the appropriate bean. This gives us an error cannot find bean name in scope.

Thanks in advance.

Re: Instantiating multiple forms in a single action

Posted By:   Jason_Taylor  
Posted On:   Tuesday, April 2, 2002 09:25 AM

My guess is that you need to instantiate the category forms "manually" in the Action class associated with the whole page/form submission, and make it available to the form by putting it into the request object with the name of the form that you set up in your struts config file. In other words, you can only associate your form with one action, so that action has to get the actionform beans for all the individual sub-forms. Whether you are submitting all the forms together as one or individually (using some other mechanism to maintain state like the session) is up to you.

Re: Instantiating multiple forms in a single action

Posted By:   Ted_Husted  
Posted On:   Wednesday, January 9, 2002 06:30 PM

There's a couple of things that could be wrong, but it's
hard to respond without seeing the code


About | Sitemap | Contact