我有一个p:datatable,带有paginatorPosition =“ both”和rowsPerPageTemplate =“ 15、25、50、75”。加载时,焦点应放在顶部下拉菜单上。但是重点放在底部下拉列表上。
<p:dataTable id="resultsTable_#{cc.attrs.lovId}" var="lov" paginator="true" rows="15" value="#{cc.attrs.dataModel}" rowsPerPageTemplate="15, 25, 50, 75"
rowKey="#{cc.attrs.rowKey}" selectionMode="single" pageLinks="5" paginatorPosition="both" rowIndexVar="rowIndexVar"
paginatorTemplate="Page {CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
paginatorAlwaysVisible="true" styleClass="LOVTable"
selection="#{lovPreferences.selectedObj}"
widgetVar="lovTable_#{cc.attrs.lovId}"
filteredValue = "#{lovPreferences.filteredResults}"
emptyMessage="Data is loading please wait..."
lazy = "#{cc.attrs.lazyLoadIndicator}"
filterDelay="1000"
>
答案 0 :(得分:0)
使用功能:
...
<h:body onload='ExecuteFunction()' >
<script>
function ExecuteFunction() {
jQuery(window).on("load", function() {
jQuery("yourFormID:yourDatatableID:yourPaginatorID)".addClass('ui-state-hover ui-state-focus'));
});
}
</script>
...
此致