[ http://galaxy.andromda.org:8080/jira/browse/BPM-157?page=history ]
     
Wouter Zoons closed BPM-157:
----------------------------

     Resolution: Fixed
    Fix Version: 3.0 RC2

apparently Struts does not populate the second form when an action forwards to 
another action, it behaves like a 'redirect'

I solved this by checking for a previous form and copying any matching values 
in the current form when entering a use-case, so now parameters are seemlessly 
transported between use-cases

> generated form not passing values to other use-case
> ---------------------------------------------------
>
>          Key: BPM-157
>          URL: http://galaxy.andromda.org:8080/jira/browse/BPM-157
>      Project: Bpm4Struts Cartridge
>         Type: Bug
>     Versions: 3.0 RC1
>     Reporter: Tomas Brejla
>     Assignee: Wouter Zoons
>      Fix For: 3.0 RC2

>
> I have a small problem with passing parameters between use cases. In 1st
> use case I have a <<FrontEndView>> with outgoing
> "Edit(idFoo:datatype::Long)" transition pointing to final state
> "editFooUseCase".
> On 2nd use-case (editFooUseCase), there's Initial state, transition to
> action "Get foo information", which contains call event to to method
> (let's call it getFooInformation(); this method has idFoo:datatype::Long
> parameter) which retreives data for Foo object with received idFoo.
> The problem is, that if I fill the idFoo edit on the first page's
> generated form and press "edit" button, the received idFoo on 2nd
> usecase is null. However, if I set the idFoo parameter explicitly in
> browser's URL, everything works fine, idFoo is transfered to second use
> case and can be used in getFooInformation() defered method succesfully.
> Form on 1st usecase's page is generated like:
> <form name="someNameForm" method="post" action="/some/action.do"...>
>   ..
>   <input type="text" name="idFoo" value="" onmous...../>
>   ..
> </form>
> ..and if I set idFoo edit in it and press edit button, it doesn't work.
> However http://localhost:8080/some/action.do?idFoo=1 works just fine.
> ------------------------- Wouter: ------------------------------------
> the parameters from the first usecase are stored in form X in request
> scope, so $request.x.myParam
> the parameters from the second usecase are stored in form Y in request
> scope, so $request.y.myParam
> that's why it seems you cannot get hold of the Y values when you are
> posting form X.
> when appending the values as query parameters straight in the URL you
> actually store them into request scope directly, for both usecases Struts
> will properly populate the forms, so you have access to this query
> parameter in three ways:
> $request.myParam
> $request.x.myParam
> $request.y.myParam
> I never actually used passing parameter between usecases that much myself,
> but I do want to solve your problem. In order to do that we would need to
> find a way to tell Struts to populate form Y (although it just finished
> populating form X)
> I need to investigate this further, I also need to validate what I just
> explained because I'm not 100% sure of it :-)
> in the meantime you should be able to do this in your usecase's Y controller:
> request.getAttribute("myParam")
> can you file a jira issue for this, when I have a little more time I will
> get to the bottom of this and make sure it works, it's not really a
> bpm4struts bug, it's rather a Struts side-effect we need to work-around
> -- Wouter

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://galaxy.andromda.org:8080/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
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
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to