Hi ,
I read a lot of post but I didn't found the answer.
I have a page with a datatable and a filter on one column.
I need to call this page from another using http param like "http:/myserver/app/page.xhtml?monfiltre=toto"
I hope that when i will success in filtering the page using a default value I will success in calling it using parameters
I defined the filter with:
...
<p:tab id="idTabAugust" title="AUGUST">
<p:dataTable
value="#{qABean.lstAugust}" id="dtAugust"
var="varAugust" widgetVar="WidgetAugust"
emptyMessage="No records found">
...
<p:column headerText="TNSX" sortBy="#{varAugust.eqpt_insp}" filterBy="#{varAugust.eqpt_insp}" filterMatchMode="contains">
<h:outputText value="#{varAugust.eqpt_insp}" />
</p:column>
...
If I enter manually the filter value in the page it is working .
if I modify the xhtml code like
<p:column headerText="TNSX" sortBy="#{varAugust.eqpt_insp}" filterBy="#{varAugust.eqpt_insp}" filterMatchMode="contains" filterValue="2">
<h:outputText value="#{varAugust.eqpt_insp}" />
</p:column>
The list is not filtered. I try to add the javascript code
<script type="text/javascript">
$j = jQuery;
$j(document).ready(function () {
WidgetAugust.filter();
});
</script>
or
<script type="text/javascript">
$j = jQuery;
$j(document).ready(function () {
PF('WidgetAugust').filter();
});
</script>
in the header or at the end of the page. It is not working.
with chrome debugger I have "WidgetAugust is not defined"
I am doing something wrong but I don't uderstand what it is.
I am using Primefaces 5.0.
thanks to help me
Datatable default filter on column
-
- Information
-
Who is online
Users browsing this forum: No registered users and 21 guests