You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bob Lee <cr...@crazybob.org> on 2003/10/07 13:31:19 UTC

Wizard with a Twist

All,

I have requirements do develop a wizard like application where you can 
have multiple questions (up to 3) on a single page.

When there are multiple questions, the first appears, you select an 
answer, and the next one appears. If you change the answer to a 
previous question, all of the succeeding answers are reset and you have 
re-answer the questions.

What the next question is bears on the answers to the previous 
questions (or some other factors). I've deemed it okay to go back to 
the server each time.

There's also a requirement to do a bread crumb trail, but it will need 
to go back pages of questions (not one question at a time). Also, going 
forward, if questions have been answered and you don't alter the 
answers, you should be able to go forward page by page as well.

I'm trying to figure out the best way to break this down (i.e. how many 
JSPs, actions, and forms to use, what scope to use for the forms, 
etc.). Key factors for maintainability will be the naming schemes (so 
you can easily follow and manipulate the flow) and the ability to move 
questions around without impacting other questions too much or making 
changes in too many places. Any tips or suggestions?

Note: I started down a more generic route where I was going to build a 
tool to manage the flow, but there's so many weird requirements (things 
specific to certain questions, etc.) that I decided it would be easier 
to just start out simple for this iteration.

Thanks,
Bob

P.S. I also have an option to use Blue Martini. Anyone have experience 
with this? Would it help me solve this problem more easily than just 
coding it with Struts?


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


Re: Using set-property attribute in action class

Posted by Kirk Wylie <kw...@m7.com>.
Oops, forgot to extend my first paragraph.

You have to write your own Configuration class which has a JavaBean 
property matching the "property" set in your <set-property> tag and 
which extends from ActionConfig. Then you can use that from your 
configuration file in order to get the parameter. The properties set are 
not general purpose, in that you can't just obtain them in general for 
any arbitrary ActionConfig instance.

HTH,
Kirk Wylie

Kirk Wylie wrote:

> You have to write your own Configuration class which has a
> 
> For example, if you wrote MyActionConfig and set up className in your
> Action element in your struts-config.xml file, and you had a tag of:
> <set-property property="foo" value="bar"/>, then
> MyActionConfig.setFoo(bar) would be called during configuration parsing
> time.
> 
> Kirk Wylie
> 
> Nisith Dash wrote:
> 
>  > How can i access the propery of a bean which i have set in the struts
>  > config
>  > file using <set-property> in my action class.
>  >
>  > thanks,
>  >
>  >
>  > ------------------------------------------------------------------------
>  >
>  > DISCLAIMER: The information contained in this message is intended 
> only and solely for the addressed individual or entity indicated in this 
> message and for the exclusive use of the said addressed individual or 
> entity indicated in this message (or responsible for delivery of the 
> message to such person) and may contain legally privileged and 
> confidential information belonging to Tata Consultancy Services. It must 
> not be printed, read, copied, disclosed, forwarded, distributed or used 
> (in whatsoever manner) by any person other than the addressee. 
> Unauthorized use, disclosure or copying is strictly prohibited and may 
> constitute unlawful act and can possibly attract legal action, civil 
> and/or criminal. The contents of this message need not necessarily 
> reflect or endorse the views of Tata Consultancy Services on any subject 
> matter. Any action taken or omitted to be taken based on this message is 
> entirely at your risk and neither the originator of this message nor 
> Tata Consultancy
> 
>  Services takes any responsibility or liability towards the same. 
> Opinions, conclusions and any other information contained in this 
> message that do not relate to the official business of Tata Consultancy 
> Services shall be understood as neither given nor endorsed by Tata 
> Consultancy Services or any affiliate of Tata Consultancy Services. If 
> you have received this message in error, you should destroy this message 
> and may please notify the sender by e-mail. Thank you.
> 
>  >
>  >
>  >
>  >
>  > ------------------------------------------------------------------------
>  >
>  > ---------------------------------------------------------------------
>  > 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


Re: Using set-property attribute in action class

Posted by Kirk Wylie <kw...@m7.com>.
You have to write your own Configuration class which has a

For example, if you wrote MyActionConfig and set up className in your 
Action element in your struts-config.xml file, and you had a tag of:
<set-property property="foo" value="bar"/>, then 
MyActionConfig.setFoo(bar) would be called during configuration parsing 
time.

Kirk Wylie

Nisith Dash wrote:

> How can i access the propery of a bean which i have set in the struts 
> config
> file using <set-property> in my action class.
> 
> thanks,
> 
> 
> ------------------------------------------------------------------------
> 
> DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy
 Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you.
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> 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


Using set-property attribute in action class

Posted by Nisith Dash <ni...@tcscal.co.in>.
How can i access the propery of a bean which i have set in the struts config
file using <set-property> in my action class.

thanks,


Re: Wizard with a Twist

Posted by Bob Lee <cr...@crazybob.org>.
Thanks, Adam, but the flow is not my main problem. Let me use a more 
detailed example:

The first page has one question:

QA

The user clicks on an answer and another question appears:

QA
QB

Again:

QA
QB
QC

The user goes back and changes the answer to the first question:

QA
QD

As you can see, it has a lot of potential for duplication. Do I model 
each of these views with a different JSP? It would make for a lot of 
simple JSPs, but the naming scheme and Struts config would quickly blow 
up. I could do one JSP, but after some time, this could easily evolve 
into one huge JSP for the entire flow (ick!).

There's also tracking the answers. i.e., it would be ideal to use the 
same form for each page, so the answer to QA always stays in sync.

Any tips?

Thanks,
Bob

Adam L wrote:

>For what it's worth, check out the workflow extension,
>http://www.livinglogic.de/Struts
>   It takes a bit of tinkering with to fully understand and appreciate its
>power (check the archives for a very recent dialog between myself and its
>designer, Matthias Bauer).  It's very simple in concept and design, but it's
>thus far been able to handle almost every need I have for workflow
>management.
>
> To put it very simply, you end up coding each component of your process as
>a puzzle piece.  You then end up stringing them together with appropriate
>actions and forwards to create your workflow process.   Component re-use has
>finally been realized for me in my workflows!
>
>-- adam
>
>
>----- Original Message -----
>From: "Bob Lee" <cr...@crazybob.org>
>To: <st...@jakarta.apache.org>
>Sent: Tuesday, October 07, 2003 6:31 AM
>Subject: Wizard with a Twist
>
>
>  
>
>>All,
>>
>>I have requirements do develop a wizard like application where you can
>>have multiple questions (up to 3) on a single page.
>>
>>When there are multiple questions, the first appears, you select an
>>answer, and the next one appears. If you change the answer to a
>>previous question, all of the succeeding answers are reset and you have
>>re-answer the questions.
>>
>>What the next question is bears on the answers to the previous
>>questions (or some other factors). I've deemed it okay to go back to
>>the server each time.
>>
>>There's also a requirement to do a bread crumb trail, but it will need
>>to go back pages of questions (not one question at a time). Also, going
>>forward, if questions have been answered and you don't alter the
>>answers, you should be able to go forward page by page as well.
>>
>>I'm trying to figure out the best way to break this down (i.e. how many
>>JSPs, actions, and forms to use, what scope to use for the forms,
>>etc.). Key factors for maintainability will be the naming schemes (so
>>you can easily follow and manipulate the flow) and the ability to move
>>questions around without impacting other questions too much or making
>>changes in too many places. Any tips or suggestions?
>>
>>Note: I started down a more generic route where I was going to build a
>>tool to manage the flow, but there's so many weird requirements (things
>>specific to certain questions, etc.) that I decided it would be easier
>>to just start out simple for this iteration.
>>
>>Thanks,
>>Bob
>>
>>P.S. I also have an option to use Blue Martini. Anyone have experience
>>with this? Would it help me solve this problem more easily than just
>>coding it with Struts?
>>
>>
>>---------------------------------------------------------------------
>>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


Re: Wizard with a Twist

Posted by Adam L <ad...@hotmail.com>.
For what it's worth, check out the workflow extension,
http://www.livinglogic.de/Struts
   It takes a bit of tinkering with to fully understand and appreciate its
power (check the archives for a very recent dialog between myself and its
designer, Matthias Bauer).  It's very simple in concept and design, but it's
thus far been able to handle almost every need I have for workflow
management.

 To put it very simply, you end up coding each component of your process as
a puzzle piece.  You then end up stringing them together with appropriate
actions and forwards to create your workflow process.   Component re-use has
finally been realized for me in my workflows!

-- adam


----- Original Message -----
From: "Bob Lee" <cr...@crazybob.org>
To: <st...@jakarta.apache.org>
Sent: Tuesday, October 07, 2003 6:31 AM
Subject: Wizard with a Twist


> All,
>
> I have requirements do develop a wizard like application where you can
> have multiple questions (up to 3) on a single page.
>
> When there are multiple questions, the first appears, you select an
> answer, and the next one appears. If you change the answer to a
> previous question, all of the succeeding answers are reset and you have
> re-answer the questions.
>
> What the next question is bears on the answers to the previous
> questions (or some other factors). I've deemed it okay to go back to
> the server each time.
>
> There's also a requirement to do a bread crumb trail, but it will need
> to go back pages of questions (not one question at a time). Also, going
> forward, if questions have been answered and you don't alter the
> answers, you should be able to go forward page by page as well.
>
> I'm trying to figure out the best way to break this down (i.e. how many
> JSPs, actions, and forms to use, what scope to use for the forms,
> etc.). Key factors for maintainability will be the naming schemes (so
> you can easily follow and manipulate the flow) and the ability to move
> questions around without impacting other questions too much or making
> changes in too many places. Any tips or suggestions?
>
> Note: I started down a more generic route where I was going to build a
> tool to manage the flow, but there's so many weird requirements (things
> specific to certain questions, etc.) that I decided it would be easier
> to just start out simple for this iteration.
>
> Thanks,
> Bob
>
> P.S. I also have an option to use Blue Martini. Anyone have experience
> with this? Would it help me solve this problem more easily than just
> coding it with Struts?
>
>
> ---------------------------------------------------------------------
> 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