You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by lo...@gmx.net on 2002/08/21 18:29:06 UTC

Wizard plus tree navigation with struts 1.1 (b2)

Hi there,

I'm trying to implement a kind of "eXtreme" wizard with Struts 1.1b2. A user
can go along a main "workflow" with next and previous buttons. The form
input is always submitted and validated, no matter if next or previous is used.
I'm trying to simulate a desktop application style behaviour as close as
possible, just for the reason of user friendliness. 

On certain forms it's possible to add more detailed information. This is
where the sub workflow branches off. But you can only go down to even more
details and return. Again, every input is submitted and validated if the user
clicked anything but the cancel (return) button.

The "workflow" might looks like this:

login
  |
tell something -> tell some more details -> tell even more details
  |
tell another thing
  |
tell whatever -> tell whatever more details
  | 
done... you are a winner


I'm using one "DispatchAction" per Form. Each action contains a next,
previous, display and a private saveFormDate method. Some actions also contain
something like displayDetailA, displayDetailB, displayDetailC methods. These
methods merely dispatch to the display method of another action. And lets assume
I'm using - as recommended - just ONE form, maybe a dynamic one...

All this seems to work so far. 

BUT NOW, what if'd like to display a nice navigation tree which allows the
user to jump BACK to already processed forms. What URL or Action would I use
as target? 



Insanity 1

Thus only the specific action knows HOW to save the entered data (even if
it's always the same big monster DynaForm) I might implement a menu taglib
which changes the urls according to the current "form"-action handler. Cause I'm
using DispatchActions I might just add a method like
"saveDateAndGoSomewhereElse" to every action. The final destination is parameter driven (e.g.:
nextView=someDetailsForm). These "entry points" are defined as global forwards.

...but I don't like taglibs and it sounds somehow cranky.



Insanity 2

I create a DefaultWizardDispatching Action which can handle (dispatch) ALL
input. The URLs of the navigation tree might look like:
/do/eXtremeDispatcher?next=jumpToStep1&commingfrom=hereAndNowStep3
/do/eXtremeDispatcher?next=jumpToStep2&commingfrom=hereAndNowStep6
commingfrom is a hidden field.

...this sounds little better, but why do I use struts if I have to build my
own controller anyway? Is struts no good if da view workflow gets too
complex?




What I want is a system which is easy to be used by the victim (user) and
easy to be understood by coworkers. So I don't want to implement some extra
tricky spaghetti code meaning for the reason of reusability I don't like the
idea of extending core parts of Struts.


Is there a chance for cure? Please tell me if should rethink the whole
design? 

Shall I use *.jspp ( http://www.livinglogic.de/Struts ) ...?

What about commons-workflow?

...Or the state machine compiler http://smc.sourceforge.net ? I also came
across many "backend" workflow projects, like http://www.opensymphony.com/ or
IBM's dragonfly...

Are there any other "struts 1.1" compatible contrib whatever extensions or
frameworks dealing with workflow/state machines/dynamic menues supporting
wizard style applications?

I can't believe that I'm the FIRST one comeing across these view workflow
issues...


Thanks for listening...

  Cheers,
      Karl-Heinz S.

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>