This sounds like a good strategy. I'd like to do very much the same
thing, but with ActionMappings rather than tablibs. One reason would be
to allow a form to be used both with and without a workfow.

Ronel Sumibcay wrote:
> 
> It hasn't caused any problems for me *so far*, but what i did was defined a
> class called WorkFlowEntry with the following properties:
> 
> workFlowEntryTarget : the entry point (uri) of a workflow
> workFlowCancelTarget : the uri of where to go when the user cancels the
> workflow...i found
>                         it may not always be the same uri as
> workFlowExitTarget.
> workFlowExitTarget : the uri of where to go when the worklow exits....in
> most cases its back                     to the jsp or action that requested
> the worklow.
> clientBeanName: the session scope bean that will be assigned the result of
> the workflow. In
>                         all my cases so far, its the ActionForm name that
> requested the workflow.
> clientBeanProperty: the property name of the bean that will be assigned the
> result of the                   workflow
> 
> An instance of this class is what is pushed on the stack. I implemented the
> equals() method that compares these properties. So when the user hits the
> browser back button, and then re-enters a workflow, all WorkFlowEntries from
> the top of the stack are popped off and ignored, and the equivalent
> WorkFlowEntry is reused.
> 
> A workflow begins when the user clicks on a special submit button generated
> by a TagLib called WorkFlowEntryButton. When clicked, it looks for an
> equivelant WorkFlowEntry before pushing it on the stack. If one exists, it
> pops until it reaches the equivalent WorkFlowEntry. It then does an internal
> forward to the WorkFlowEntry's "workFlowEntryTarget".
> 
> There is a corresponding TagLib called WorkFlowExitButton also tied to a
> submit button that does the pop. Attributes of the tag include the name of a
> bean and its propertyname containing the result, it assigns the result to
> 'clientBeanName.clientBeanProperty' specified in the popped WorkFlowEntry.
> After assigning the result, it then does an internal forward to the uri
> specifed by 'workFlowExitTarget'.
> 
> -ronel

Reply via email to