基于带参数函数的java SEAM导航
如何基于SEAM中带有参数的函数设置导航规则
比如说
<page view-id="/firstPage.xhtml" back="enabled">
<navigation from-action="#{actionBean.fetchItem(int index)}">
<redirect view-id="/itemDetail.xhtml" />
</navigation>
</page>
你可以在下面搜索框中键入要查询的问题!
如何基于SEAM中带有参数的函数设置导航规则
比如说
<page view-id="/firstPage.xhtml" back="enabled">
<navigation from-action="#{actionBean.fetchItem(int index)}">
<redirect view-id="/itemDetail.xhtml" />
</navigation>
</page>
# 1 楼答案
有可能
但是来自动作签名必须匹配你的commandButton、commandLink等动作属性
假设您的命令如下所示
现在开始导航
# 2 楼答案
我不明白为什么你需要一个参数,当你对所有参数都有一个结果时
如果它确实是你想要的,那么就不要使用任何参数
如果您想执行操作,然后返回视图,那么可以从操作方法返回适当的
String