Bonjour
Je cherche à passer un object d'un flow à un subflow.
L'object en question est une variable d'un flow que j'ai évalué en début de flow et placé en conversation scope, donc le but de l'avoir visible dans le flow et ses subflow, mais arrivé en subflow l'appel de cette objet par EL dans la page web me renvoi vide.
voici le flow parent
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 <?xml version="1.0" encoding="UTF-8"?> <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> <secured attributes="ROLE_USER"/> <persistence-context/> <on-start> <evaluate expression="requestParameters.contains('from') ? requestParameters.get('from') : 'home'" result="flowScope.from"/> <evaluate expression="userService.currentUserModel" result="conversationScope.userModel"/> </on-start> <view-state id="editProfile" model="userModel"> <transition on="profileExitAction" to="profileEndFlow"/> <transition on="validateProfile" to="reviewProfile"> <evaluate expression="userFaces.validateUpdateProfileAction(userModel)"/> </transition> <transition on="modifySecondaryEmail" to="editSecondaryEmail"/> <transition on="modifyPassword" to="editPassword"/> </view-state> <view-state id="reviewProfile" model="userModel"> <transition on="profileExitAction" to="profileEndFlow"/> <transition on="reviseUpdateProfile" to="editProfile"/> <transition on="confirmUpdateProfile" to="profileEndFlow"> <evaluate expression="userService.updateProfile(userModel)"/> </transition> </view-state> <subflow-state id="editSecondaryEmail" subflow="secondaryEmail"> <!--ici je veux passer le model userModel au subflow secondaryEmail--> <transition on="secondaryEmailEndFlow" to="editProfile"/> </subflow-state> <subflow-state id="modifyPassword" subflow="password"> <!--TODO--> </subflow-state> <end-state id="profileEndFlow" view="externalRedirect:#{from}" commit="true"/> </flow>
sublflow
Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 <?xml version="1.0" encoding="UTF-8"?> <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd"> <view-state id="editSecondaryEmail" model="userModel"> <transition on="secondaryEmailExitAction" to="secondaryEmailEndFlow"> <evaluate expression="userModel.user.setUserEmails(userService.currentUserModel.user.userEmails)"/> <evaluate expression="userModel.secondaryEmailValue == null ? userModel.setSecondaryEmail(null) : userModel.setSecondaryEmail(userService.currentUserSecondaryEmail)"/> </transition> <transition on="validateSecondaryEmail" to="reviewSecondaryEmail"> <evaluate expression="userFaces.validateUpdateProfileAction(userModel)"/> </transition> </view-state> <view-state id="reviewSecondaryEmail" model="userModel"> <transition on="secondaryEmailExitAction" to="secondaryEmailEndFlow"> <evaluate expression="userModel.user.setUserEmails(userService.currentUserModel.user.userEmails)"/> <evaluate expression="userModel.secondaryEmailValue == null ? userModel.setSecondaryEmail(null) : userModel.setSecondaryEmail(userService.currentUserSecondaryEmail)"/> </transition> <transition on="reviseUpdateSecondaryEmail" to="editSecondaryEmail"/> <transition on="confirmUpdateSecondaryEmail" to="secondaryEmailEndFlow"/> </view-state> <end-state id="secondaryEmailEndFlow"/> </flow>
Partager