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
Assigned to: Wouter Zoons
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
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/Info/Sentarus/hamr30
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel