Primefaces p:datatable我们如何在数据表中显示底部滚动条?

时间:2013-12-30 03:33:17

标签: jsf primefaces datatable

我的代码是这样的......但是底部没有显示滚动条。 我们如何才能在数据表中显示底部滚动条?

<p:dataTable scrollHeight="250"  id="data" var="item" value="#{saleOrderDetailViewModel.items}" 
                resizableColumns="true" liveResize="true" scrollable="true" rowIndexVar="rowInfo" 
                emptyMessage="#{pmtsCommonUtilViewModel.datatableEmptyMessage}"  
                paginatorPosition="bottom" paginator="true" rows="#{pmtsCommonUtilViewModel.rowsPerPage}"  
                rowsPerPageTemplate="#{pmtsCommonUtilViewModel.rowsPerPageTemplate}"
                paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">

                    <p:column id="order_no" rendered="true" headerText="销售单编号" style="width:130px"> 
                        #{item.orderNo} 
                    </p:column>

</p:dataTable>

1 个答案:

答案 0 :(得分:0)

如果要显示底部滚动条,请指定scrollWidth

像这样:

<p:dataTable scrollWidth="250" scrollHeight="250" id="data" var="item" value="#{saleOrderDetailViewModel.items}" 
            resizableColumns="true" liveResize="true" scrollable="true" rowIndexVar="rowInfo" 
            emptyMessage="#{pmtsCommonUtilViewModel.datatableEmptyMessage}"  
            paginatorPosition="bottom" paginator="true" rows="#{pmtsCommonUtilViewModel.rowsPerPage}"  
            rowsPerPageTemplate="#{pmtsCommonUtilViewModel.rowsPerPageTemplate}"
            paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">

                <p:column id="order_no" rendered="true" headerText="销售单编号" style="width:130px"> 
                    #{item.orderNo} 
                </p:column>
</p:dataTable>