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>

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