2011-09-20 68 views
0

使用Spring Webflow的2.3.0,我怎麼能叫流A的特定視圖狀態從流量B.從流動BI要呼叫流程的特定視圖狀態 - 春天的Webflow

我可以使用子流?

從流動B,我想去的ViewState = 「高清」 的流動的

流B

<subflow-state id="actions1" subflow="A"> 
</subflow-state> 

滲流的

<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="abc"> 
</view-state> 
<view-state id="def"> 
</view-state> 

能有人請告訴我如何做到這一點..dint找到谷歌的任何東西

+0

我還沒有開始在這個問題上的賞金,爲什麼它顯示「在兩天內可獲得賞金的問題」 – C4CodeE4Exe

回答

2

簡而言之,你不能。

甲流動定義爲

的,可以在不同的上下文

在這種情況下執行的步驟可重複使用的序列,def是其自身的流動。另外,流量只能從第一個狀態訪問。

考慮,氣流A:

<view-state id="searchUsersView" model="searchCriteriaWm" view="users/list"> 
    <transition on="selectUser" to="detailView"> 
    <set name="detailWm" value="usersActions.getUserDetail(searchCriteriaWm.selectedElementId)" /> 
    </transition> 
</view-state> 

和流量B:

<view-state id="createUserView" model="createUserWm" view="users/create"> 
    <transition on="submit" to="detailView"> 
    <evaluate expression="userActions.createUser(createUserWm)" result="detailWm" /> 
    </transition> 
</view-state> 

不是有兩個detailViews,您可以輕鬆地創建,可以作爲一個子流訪問的詳細流程。

<input name="detailWm"> 
<view-state id="detailView" model="detailWm" view="users/detail"> 
</view-state>