一:UI命令组件
<s:link view=" " propagation="end" value="Cancel" />
二:page.xml中
<page view-id=" ">
<navigation>
<rule if-outcome="cancel">
<end-conversation/>
<redirect view-id=" "/>
</rule>
</navigation>
</page>
Seam UI的命令组件与这个导航规则相匹配
<s:link action="cancel" value="Cancel" />
用UI命令组件代替<s:link>需要将immediate属性设置为true,以防止此表单被处理
<h:commandLink action="cancel" value="Cancel" immediate="true" />
三:终止对话只是将长期对话降为临时对话,并没有将对话销毁,只有当视图显示之后,临时对话才结束。因此,对话中出现的任何值在紧随降级之后的Render Response阶段中仍然保持可用。如果想在下一次渲染之前终止对话,可以在end对话指令中设置beforeRedirect标签,然后在发生降级之后发出一个重定向:
<page view-id=" " >
<navigation>
<rule if-outcome="cancel">
<end-conversation before-conversation="true"/>
<redirection view-id=" " />
</rule>
</navigation>
</page>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。