Flex通過struts跳轉到其他頁面

在Flex中,不能直接通過struts的默認配置實現跳轉,但是可以藉助Redirect來實現,下面簡單描述下操作流程。

1.在flex頁面通過window自帶的跳轉,實例代碼如下:

  ExternalInterfaca.call("function(){ window.location.href='xx.do?type=2'}");

2.struts中的配置

<action name="" class="" method>

     <!-- 通過這種方式跳轉就行-->

     <result name="" type="redirect">/test.html</result>

    <!-- 採用這種方式爲了解決action之前相互傳遞參數,action中需要提供id對應的getter方法即可-->

    <result name="" type="redirect">/命名空間/test.do?id=${#request.id}</result>

</action>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章