struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Muller <mmul...@theworld.com>
Subject Re: best way to build a wizard
Date Fri, 11 Jul 2003 01:40:50 GMT

I'm not sure that really solves my problem.  What do I put as the 
"input" for this action?  I can't use the same action; whatever 
attribute I used to indicate that I want to move to the next page would 
still be in the system, so validation failures would bring me to the 
next page rather than the same page.

I'm pondering an approach with two actions, a "next page" action which 
has a "same page" action as its input.

   -- Mike

Rodney Paul wrote:

> Check out the lookupDispatchAction classes.
> These classes were designed specifically for Actions which require more
> than one execute method (in this instance a method for back and next).
> That is what I have used, and is perfect for use when developing wizard applications.
> 
> Cheers
> Rodney
> 
> -----Original Message-----
> From: Michael Muller [mailto:mmuller@theworld.com]
> Sent: Friday, 11 July 2003 8:41 AM
> To: Struts Users Mailing List
> Subject: Re: best way to build a wizard
> 
> 
> 
> It turns out that I can't pass the action into the html:form tag using 
> tiles; that would involve nesting JSP tags.  Grr.
> 
> I guess my only recourse is to have the open html:form tag in the 
> inserted body and the close html:form tag in the template.  Ick.
> 
> So now I'm trying to figure out a way to have one one action mapping. 
> Any ideas?  Or alternative approaches?
> 
>    -- Mike
> 
> Michael Muller wrote:
> 
>>My app has a bunch of wizard-style forms.  I have one "NextPageAction" 
>>Action class, and an separate mapping for each page.  The mappings all 
>>bind to the same form bean (a DynaValidatorForm) and invoke the 
>>"NextPageAction".
>>
>>I was hoping to have only one action mapping, with a whole bunch of 
>>forwards for "page1", "page2", etc.  The problem that prevents me from 
>>having one action mapping is validation:  I need the "input" attribute 
>>to redirect me to the correct wizard screen.
>>
>>So I went back to having lots of mappings.  No big deal.  Until...
>>
>>I factored the "next" and "back" buttons into the template.  With those 
>>buttons, wend the closing "html:form" tag.  Makes sense to move the 
>>opening "html:form" tag into the template, too, right?  Oops, my action 
>>is in there.
>>
>>What do I do?
>>
>>I could leave the closing tag in the template and the opening tag in the 
>>inserted body.  Gross.
>>
>>I could try and pass the action into the template through my tiles-defs. 
>> That's kinda kludgy, too.
>>
>>I'm back to thinking I should have one action mapping.  But I don't know 
>>how to accomplish this.
>>
>>Suggestions?
>>
>>Thanks,
>>
>>Mike
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message