Jsf ';检查';不显示在p:SelectMany菜单中的选定项目上

Jsf ';检查';不显示在p:SelectMany菜单中的选定项目上,jsf,primefaces,Jsf,Primefaces,我正在使用Primefaces 5.3中的selectManyMenu小部件来显示用户在我们每个应用程序中可以拥有的角色列表 <p:outputLabel value="Roles:" rendered="#{controller.enabledApp[app.id] and not empty app.roles}"/> <p:selectManyMenu converter="#{roleConverter}" var="r" filter="true" filterMat

我正在使用Primefaces 5.3中的selectManyMenu小部件来显示用户在我们每个应用程序中可以拥有的角色列表

<p:outputLabel value="Roles:" rendered="#{controller.enabledApp[app.id] and not empty app.roles}"/>
<p:selectManyMenu converter="#{roleConverter}" var="r" filter="true" filterMatchMode="contains" showCheckbox="true"
  rendered="#{controller.enabledApp[app.id] and not empty app.roles}" value="#{app.selectedRoles}">

    <f:selectItems value="#{app.roles}" var="role" itemLabel="#{role.name}" itemValue="#{role}"/>

    <p:column>
        <h:outputText value="#{r.name}"/>
    </p:column>
</p:selectManyMenu>

问题是,当我从数据库预加载这些角色,填充应用实体的selectedRoles字段时,Primefaces会将ui状态高亮显示CSS类添加到用于表示这些选定角色的表行中,但不会将ui状态活动添加到表示复选框的div中

这就是我得到的:

<tr class="ui-selectlistbox-item ui-corner-all ui-state-highlight" style="">
  <td>
    <div class="ui-chkbox ui-widget">
      <div class="ui-chkbox-box ui-widget ui-corner-all ui-state-default">
        <span class="ui-chkbox-icon ui-icon ui-icon-check ui-c"/>
      </div>
    </div>
  </td>
  <td>Admin</td>
</tr>

管理
这就是我应该得到的:

<tr class="ui-selectlistbox-item ui-corner-all ui-state-highlight" style="">
  <td>
    <div class="ui-chkbox ui-widget">
      <div class="ui-chkbox-box ui-widget ui-corner-all ui-state-default ui-state-active">
        <span class="ui-chkbox-icon ui-icon ui-c ui-icon-check"/>
      </div>
    </div>
  </td>
  <td>Admin</td>
</tr>

管理
当父tr具有ui状态突出显示类时,我可以更改CSS以显示复选框,但我更愿意解决这个问题


这可能是Primefaces中的一个bug吗?我是否有一些不知道的错误?

是的,我正在使用最新版本,PrimeFaces 5.3检查PF源是否存在此行为?我遇到了相同的问题,我发现这已经超过4年没有得到回答。是的,我正在使用最新版本,PrimeFaces 5.3检查PF源是否存在此行为?我遇到了相同的问题,我知道这已经有四年多没有人回答了。