2013-05-20 40 views
1

在我的視圖狀態中不會調用轉換,並且當我在登錄頁面中單擊fogotusername鏈接時,它會再次登錄到登錄頁面本身。我認爲webflow會話不知何故丟失。任何想法?請幫忙。在我的login.jsp轉換不在視圖狀態下在spring webflow中調用

fogotUsername鏈接低於:

<a href="login.do?_eventId=fogotUsername&page=init" > <spring:message code="label.forgetUsername" /></a> 

我的登錄流程XML如下:

<?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" start-state="login">  


    <view-state id="login" view="tiles.login"> 
     <transition on="fogotUsername" to="viewForgotUsername">   
     </transition> 
     <transition on="fogotPassword" to="viewForgotPassword"> 
     </transition> 
    </view-state> 

    <view-state id="viewForgotUsername" view="tiles.forgotUsername"> 
    </view-state> 

    <view-state id="viewForgotPassword" model="password" view="tiles.changePassword"> 
     <transition on="submit" to="viewForgotUsername"/> 
    </view-state> 

    <end-state id="loginend"/> 

</flow> 

回答

0

鏈接不包含流程執行URL。嘗試用以下代替您的鏈接元素:

<a href="${flowExecutionUrl}&_eventId=fogotUsername"><spring:message code="label.forgetUsername" /></a>

+0

非常感謝凱文!有效! – JPN

相關問題