Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.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
具有冻结列的Primefaces datatable在浏览器大小减小然后最大化时响应_Primefaces_Primefaces Datatable_Frozen Columns - Fatal编程技术网

具有冻结列的Primefaces datatable在浏览器大小减小然后最大化时响应

具有冻结列的Primefaces datatable在浏览器大小减小然后最大化时响应,primefaces,primefaces-datatable,frozen-columns,Primefaces,Primefaces Datatable,Frozen Columns,创建了一个常规primefaces数据表,4列被冻结,15列可滚动 当浏览器大小减小时,数据表将调整为较小的宽度,但当最大化时,它不会响应增加的宽度。下面是代码 <p:dataTable id="usersList" var="user" widgetVar="userList" value="#{UserBean.userList}" scrollRows="15"

创建了一个常规primefaces数据表,4列被冻结,15列可滚动

当浏览器大小减小时,数据表将调整为较小的宽度,但当最大化时,它不会响应增加的宽度。下面是代码

<p:dataTable id="usersList" var="user" widgetVar="userList"
            value="#{UserBean.userList}" scrollRows="15" style="overflow-x: hidden;"
            scrollable="true" scrollWidth="99%" frozenColumns="2" 
            emptyMessage="No records found.">
        <p:ajax event="filter" oncomplete="updateFilters()"/>

        <p:column headerText="User ID" style="width:70px; height: auto; vertical-align: top;">
            <h:outputText id="userId" value="#{user.userId}" style="text-align: center;"/>
        </p:column>
        
        <p:column headerText="User Name" 
                sortBy="#{user.userName}" sortOrder="ascending" filterable="true" 
                filterBy="#{user.userName}" filterMatchMode="in" 
                style="width:120px; height: auto; vertical-align: top;">
            <f:facet name="filter">
                <p:selectCheckboxMenu label="" onchange="PF('userList').filter()" 
                        scrollHeight="200" updateLabel="true">
                    <f:selectItems value="#{UserBean.userListForFilter}" />
                </p:selectCheckboxMenu>
            </f:facet> 
            <h:outputText id="userName" value="#{user.userName}" style="height: 30px;"/>
        </p:column>
        
         <p:column headerText="User City" style="width:70px; height: auto; vertical-align: top;">
            <h:outputText id="userCity" value="#{user.city}" style="text-align: center;"/>
        </p:column>

        <p:column headerText="Date Created" style="width:100px; height: auto; white-space: nowrap; vertical-align: top;">
            <h:outputText id="createdDate" value="#{user.createdTs}">
                <f:convertDateTime pattern="MM/dd/yyyy"/>
            </h:outputText>
        </p:column>
        
    </p:dataTable>

PF版本?你在用什么主题?你能发布一个你得到的截图吗?