Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css Primefaces:DataTable selection复选框在没有主题的情况下无法工作_Css_Jsf_Primefaces - Fatal编程技术网

Css Primefaces:DataTable selection复选框在没有主题的情况下无法工作

Css Primefaces:DataTable selection复选框在没有主题的情况下无法工作,css,jsf,primefaces,Css,Jsf,Primefaces,对不起我的英语。我使用没有主题的素面 在web.xml中: <context-param> <param-name>primefaces.THEME</param-name> <param-value>none</param-value> </context-param> 我点击一个复选框,然后点击commandButton测试。但它不起作用。列表{testMB.selectedList}为空 但是,如果我

对不起我的英语。我使用没有主题的素面

在web.xml中:

<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>none</param-value>
</context-param>
我点击一个复选框,然后点击commandButton测试。但它不起作用。列表{testMB.selectedList}为空

但是,如果我单击了一行而不是复选框,并且对于多个选择,我使用ctrl键,那么它就起作用了

若我使用默认主题,那个么复选框是有效的


当我单击没有主题的复选框时,为什么不工作。

将PrimeFaces主题设置为“无”。为什么?为了定制主题。我使用PrimeFaces就像使用jsf组件一样,但是为什么要使用空的PrimeFaces.css呢?为什么要重新设计组件内部的结构?保持primefaces.css不变,并覆盖您需要的内容。@Vsevolod,现在我不使用空的primefaces.css。我照你说的做。非常感谢。
<h:form id="form">
    <p:dataTable id="testTableId" var="testTable" value="#{testMB.entityList}"
                 selection="#{testMB.selectedList}" rowKey="#{testTable.id}"
                 tableStyleClass="table table-hover table-bordered">

        <p:column selectionMode="multiple" style="width:16px;text-align:center"/>
        <p:column headerText="testName">
            #{testTable.name}
        </p:column>                            

        <f:facet name="footer">
            <p:commandButton process="testTableId" update="@form" icon="ui-icon-search" value="test"/>
        </f:facet>
    </p:dataTable>

    <ui:repeat value="#{testMB.selectedList}" var="selectedList" id="ddddddddddd">
        <h:outputText value="#{selectedList.id} - #{selectedList.name}"/>
    </ui:repeat>
</h:form>