Use the filterValue property of the column tag in primefaces, something like
<p:datatable ... widgetVar="dataTableWidgetVar">
<p:column ... filterValue="#{BackingBean.defaultValue}">
Then, create a simple function call in javascript for triggering the filter, when the page is ready (the widget vars are created via jQuery in PF):
<script type="text/javascript" target="body">
$j = jQuery;
$j(document).ready( function() {
dataTableWidgetVar.filter();
});
</script>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…