I am struggling to get this simple functionality. I have a screen which lists data in p:dataTable according to user input parameters. Once user is done viewing data based on a particular criteria, he will again query the same dataTable with new criteria. My question is how do I reset the state of dataTable so that it is ready for loading new data based on another criteria. Currently, I am using the following code to reset the dataTable, but it doesn't work as expected.
Backing Bean:
Code: Select all
lazyDataModel.setRowCount (0); //
dataTable.setPage(1);
dataTable.setFirst(0);
regard,
Nirvan.