|
From: Erwin V. <erw...@er...> - 2005-03-30 07:48:32
|
This is a bug. It was possible in the original Ervacon web flow
implementation and should still be possible.
Fixing....
Done. I've added a unit test to verify the behaviour. Thanks for catching
this!
Erwin Vervaet
erw...@er...
----- Original Message -----
From: "Will Butler" <wil...@ra...>
To: <spr...@li...>
Sent: Wednesday, March 30, 2005 1:15 AM
Subject: Re: [Springframework-developer] Web Flow - Complex StateTransitions
>I am now trying the "forward:..." approach, but when doing a forward to
> another top level flow, the flowId of the original flow is still in the
> request parameters. This causes an error in the
> HttpServletFlowExecutionManager, since the flowId is for the first top
> level flow... What can I do about that?
>
> Thanks,
>
> Will
>
>> > The Save (create and continue editing) button brings up another
>> > interesting issue... Because we have defined each of our CRUD
>> > operations
>> > in a separate web flow, we really want to forward directly to our edit
>> > web flow after creating (we don't want to nest a subflow). While this
>> > is
>> > possible using end state and a view (forward:...), it isn't possible to
>> > send any request attributes along to the edit flow. Therefore, it is
>> > not
>> > possible to send the primary key of the domain object that we wish to
>> > edit.
>>
>> Actually, that is possible. All data in the request scope will be put in
>> the
>> request attributes by Spring MVC, even when forwarding to another
>> top-level
>> flow using "forward:...". The only little snag is that the top level flow
>> will have
>> to obtain the domain object id from the request attributes, while it is
>> typically
>> in the request parameters or flow scope (e.g. when mapped in).
>> If you want to reuse your flows both stand-alone, as a subflow, or as a
>> flow
>> triggered via a forward, the easiest solution is to have an "input
>> parameter
>> setup"
>> action at the start of the flow. This action will do some logic like
>> this:
>>
>> if (id in flow scope) {
>> success
>> }
>> else if (id in request attributes) {
>> take from request attributes and put in flow scope
>> success
>> }
>> else if (id in request parameters) {
>> take from request parameters and put in flow scope
>> success
>> }
>> error
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
|