The input property is a URI -- not necessarily a page. So, in the case
of a Wizard workflow, you could specify a mapping to an Action (with
validate=false) that would in turn dispatch to the appropriate input
page, perhaps by keying on the infamous "page" property.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Stephen Owens wrote:
> 
> Struts Folk,
> 
> In the case of a failure when validating a form bean on a multi-page
> form it looks to me like the user is always returned to the page defined
> as the input page in the struts action configuration. That works fine
> for a single page form but for multi-page forms I want to return to the
> current page in the wizard. I have overridden the processValidate method
> from the struts ActionServlet class to make this work, but I think I'm
> missing the way it's 'supposed' to be done. Can someone explain what I
> should be doing?
> 
> If there isn't a right way to do it currently then I would suggest
> factoring a method out of the processValidate method to do a lookup for
> the page to return to (findValidateFailUri?). There could be some
> standard logic implemented in ActionServlet to return to the input page,
> but then subclasses could override just this factored method to do their
> page lookup. Since many struts apps use a "page" parameter to indicate
> which page of a multi-page form they are on, then name the action
> forwards in the action definition as pageN, we could implement a simple
> extension to return to the 'current' page. That's what I've done in my
> override. If it would be useful I'm happy to post my overridden code.
> 
> regards,
> 
> Stephen Owens
> Corner Software

Reply via email to