I have a Form that maintains a couple collections that are populated by the Action 
class.  If this form fails validation, the struts servlet sends the request back to 
the input page, but then the collections are empty.

In "Struts In Action", page 310, Ted Husted talks about routing the failed request 
through another Action method that repopulates those collections.  I tried writing a 
method like that in my Action class, named "invalidUser" which regenerates the 
collections that I need and puts them back into the form.  My entry in the 
struts-config looks like this:

<action path="/user_admin_editor/submit_user"
                        type="com.ignitemedia.sportseditor.user.struts.UserAction"
                        name="userForm"
                        scope="request"
                        parameter="method"
                        validate="true"
                        input="/user_admin_editor/edit_user.do?method=invalidUser"
                >
                        <forward name="success" 
path="/pages/user_admin_editor/confirm.jsp"/>
                </action>

If the validation fails, the input call goes to edit_user.do, with the method name 
invalidUser.

For whatever reason, this doesn't work.  At first I was getting errors saying it 
couldn't find the invalidUser method.  Then I changed the "inputForward" attribute of 
the <controller> tag to "true".  I don't get the errors now, but just a blank page.

I'm a little clueless.  Any ideas out there?

-Doug Padian

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to