我有一个页面显示一些个人资料,所以它是 URL ../faces/savedProfile.xhtml?profileId=1234
。
在那个页面上,我的 p:pane 包含一些 p:commandLink 组件,如下所示:
<p:panel rendered="#{profileController.canViewProfile}">
...
<p:commandLink
id="duplicateLink"
value="Duplicate"
action="#{profileController.duplicateProfile}"/>
...
</p:panel>
有用。现在我想添加另一个渲染条件:
<p:panel rendered="#{profileController.canViewProfile
and param['profileId'] != null}">
...
<p:commandLink
id="duplicateLink"
value="Duplicate"
action="#{profileController.duplicateProfile}"/>
...
</p:panel>
p:commandLink 已显示,但未激活。似乎单击时未调用操作方法。为什么那个额外的渲染条件会杀死 commandLink?