Derek,

Cool, I thought I was missing something here.. 

I too have created a wizard capability in Struts.. I'm using a nightly
build from Jan and haven't upgraded due to lack of time. We have it
slated to update soon, though, to the latest build. I have installed a
1.1 nightly on the side and looked at it, though. With that, I used the
validator's request parameter name of 'page' in a hidden form field to
POST the wizard page to the server. A custom Action subclass looks for
that, looks for a next, back, create, or cancel button press, and
performs the appropriate action. In my mapping file, I create entries
for things like /createFoo, with forwards to page1, page2, page3, page4,
etc. (which is the concat of the string "page" with the intended page
number). The unfortunate side effect of this is that I must make entries
for /createFoo2, /createFoo3, etc. for the validator to return to the
appropriate input page should validation throw an error. I intended to
customize my mapping, but nothing has been done so far. 

On the topic of you putting in a request process, one thing I was
thinking: the request process idea is nice - no more changing the
servlet mapping in the web.xml. But, I was wondering if it shouldn't be
a chain of responsibility to allow multiple processors to be given the
chance to process a request, based on some parameter, path, or whatever.
Seems odd to have a tiles request processor that I have to then extend
to add my functionality should I decide to use Tiles as well. Dunno,
just a thought. 

Mind sharing how you did your wizard approach?

James

> -----Original Message-----
> From: Derek Lin [mailto:dereklin@;hotmail.com] 
> Sent: Monday, November 11, 2002 2:22 PM
> To: Struts Developers List
> Subject: Re: Unclear semantics on form use for "wizards"
> 
> 
> I don't think there are any javadocs on this.  Struts 
> download comes with an example, struts-validator.war.  (It 
> uses ValidatorForm and calls validation inside the action class)
> 
> I have spent a lot of time on this trying to make easy use of 
> DynaValidatorForm and multi-page form wizard.  Right now I am 
> thinking of extending the RequestProcessor too. (I don't want 
> to extend DynaValidatorForm, not yet. -- Because I am lazy 
> and I don't want to write Forms manually)
> 
> -- Derek
> 
> ----- Original Message -----
> From: "James Higginbotham" <[EMAIL PROTECTED]>
> To: "Struts Developers List" <[EMAIL PROTECTED]>; 
> <[EMAIL PROTECTED]>
> Sent: Monday, November 11, 2002 12:03 PM
> Subject: RE: Unclear semantics on form use for "wizards"
> 
> 
> Which javadocs are you all referencing for this discussion 
> regarding wizards? I mean, I haven't seen wizard stuff in 
> struts proper before, just in the workflow extension. Are we 
> talking anything new, or just the application of struts 1.1 
> features into a custom wizard implementation via DynaForms, et. al.?
> 
> Thanks,
> James
> 
> > -----Original Message-----
> > From: edgar [mailto:edgar@;blue-moose.net]
> > Sent: Monday, November 11, 2002 1:56 PM
> > To: 'Struts Developers List'
> > Subject: RE: Unclear semantics on form use for "wizards"
> >
> >
> > Isn't a better way of handling this to keep awareness of 
> the action in 
> > progress (in reset and validate you can just look at the 
> request), and 
> > make a decision as to what reset action to take rather than 
> creating 
> > new classes.
> >
> > Hope that helps.
> >
> > Edgar
> >
> > -----Original Message-----
> > From: Jason Rosen [mailto:JRosen@;yvimail.com]
> > Sent: Monday, November 11, 2002 2:26 PM
> > To: Struts Developers List
> > Subject: RE: Unclear semantics on form use for "wizards"
> >
> >
> > Hmmm... I'll have to look into how reset() impacts unchecked 
> > checkboxes
> > - I haven't had to deal with too many checkboxes in my project.
> >
> > Thanks for raising some issues to make me think about it, Craig.
> >
> > Jason
> >
> > > -----Original Message-----
> > > From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> > > Sent: Monday, November 11, 2002 11:21 AM
> > > To: Struts Developers List
> > > Subject: RE: Unclear semantics on form use for "wizards"
> > >
> > >
> > >
> > >
> > > On Mon, 11 Nov 2002, Jason Rosen wrote:
> > >
> > > > Date: Mon, 11 Nov 2002 11:11:41 -0800
> > > > From: Jason Rosen <[EMAIL PROTECTED]>
> > > > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > > > To: Struts Developers List <[EMAIL PROTECTED]>
> > > > Subject: RE: Unclear semantics on form use for "wizards"
> > > >
> > > > Craig,
> > > >
> > > > That's true, I could have subclassed DynaValidatorForm and
> > > modified the
> > > > reset() method to accomodate my needs.
> > > >
> > > > Originally, I had taken that route, but then found myself
> > with many
> > > > ActionForm subclasses to accomodate all sorts of
> > scenarios - I had
> > > > subclasses of DynaActionForm, DynaValidatorForm, and
> > > ActionForm, just to
> > > > turn off reset().
> > > >
> > > > I found that by centralizing the reset "switch" and 
> being able to 
> > > > declare it in the struts-config.xml made my code and config
> > > files much
> > > > cleaner, re-usable, and easier to maintain.  I also figured
> > > that if the
> > > > validate() hotspot could be turned on and off from the 
> > > > struts-config.xml, why not reset()?
> > > >
> > >
> > > I think allowing reset() to be turned off completely would be 
> > > confusing and error prone for anyone using a boolean form bean 
> > > property, because an unchecked checkbox would no longer work as 
> > > expected.
> > >
> > > > Jason Rosen
> > > >
> > >
> > > Craig
> > >
> > >
> > > > -----Original Message-----
> > > > From: Craig R. McClanahan [mailto:craigmcc@;apache.org]
> > > > Sent: Monday, November 11, 2002 11:04 AM
> > > > To: Struts Developers List
> > > > Subject: RE: Unclear semantics on form use for "wizards"
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, 11 Nov 2002, Jason Rosen wrote:
> > > >
> > > > > Date: Mon, 11 Nov 2002 10:04:42 -0800
> > > > > From: Jason Rosen <[EMAIL PROTECTED]>
> > > > > Reply-To: Struts Developers List 
> <[EMAIL PROTECTED]>
> > > > > To: Struts Developers List <[EMAIL PROTECTED]>
> > > > > Subject: RE: Unclear semantics on form use for "wizards"
> > > > >
> > > > > Hi,
> > > > >
> > > > > I actually had a similar problem with wanting to use
> > > Session scoped
> > > > > ActionForms and not having them reset every time they
> > > were recycled by
> > > > > an Action.
> > > > >
> > > >
> > > > An alternative strategy is to make the reset() method of
> > > your form beans
> > > > smarter about which page of a multi-page wizard this submit
> > > is for (easy
> > > > to determine because reset() has access to the request).
> > > >
> > > > Craig
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> > > For additional commands, e-mail: 
> > > <mailto:struts-dev-help@;jakarta.apache.org>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
> > > For additional commands, e-mail: 
> > > <mailto:struts-dev-help@;jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-dev-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-dev-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-dev-> [EMAIL PROTECTED]>
> > For
> > additional commands,
> > e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
> >
> >
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-dev-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-dev-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:struts-dev-help@;jakarta.apache.org>
> 
> 

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to