环境:JSF 2.2.14,PrimeFaces 6.2
我将命令按钮设置如下,当禁用按钮时,标题将在PF6.1中显示(悬停时),但不会在PF6.2中显示
<p:commandButton id="removeCmd" icon="fa fa-times"
actionListener="#{controller.remove()}"
update="@form"
disabled="#{ontroller.isCommandDisabled()}"
style="width: 20px; height:20px;margin-left: 5px;"
title="#{controller.isCommandDisabled() ? 'Command disabled due to user privilege' : 'remove selected item'}"
onstart="PF('bui').show(); PF('bar').show();"
oncomplete="PF('bui').hide(); PF('bar').hide();"
styleClass="removeCmd"/>
Run Code Online (Sandbox Code Playgroud)
未禁用按钮时标题显示良好。
有人遇到同样的问题吗?我还尝试将我的p:commandButton包装在h:panelGrid内,并使用p:tooltip,两者都不起作用。
更新:在github上创建的问题:https : //github.com/primefaces/primefaces/issues/3656