【发布时间】:2012-12-06 19:06:23
【问题描述】:
在我的 .xhtml 页面中,我有 2 个 h:commandButton 元素:
<h:commandButton immediate="true" lang="en" class="msbutton" action="#{user.changeLanguage()}" value="Test1">
</h:commandButton>
<h:commandButton immediate="true" lang="en" class="msbutton" action="#{user.test()}" value="Test2">
</h:commandButton>
我的问题是,当我刷新页面时,再次触发最后一次单击的按钮,并执行托管 bean 中的操作。
我不希望在页面刷新时触发该操作。 (仅在单击按钮时触发)。
我需要改变什么吗?我需要做什么才能在不触发按钮操作的情况下刷新页面?
提前致谢。
【问题讨论】: