Hi All,
When I return to a datatable, I would like the filters/sort to be like it was when I paged away. How do you save/restore the datatable state?
In addition, I would like to be able to set a filter value. For instance, I have just added a record to the table via another page. When I return to the table, I would like to set the filter value such that this new record appears.
Can anyone help me?
Using 2.2.1.
Thanks,
Judy
Datatable - save filter/sort state
-
- Posts: 55
- Joined: 08 Sep 2010, 09:18
- Location: Banja Luka, Bosnia and Herzegovina
- Contact:
Can we create an issue ticket for this?887662 wrote:Hi All,
When I return to a datatable, I would like the filters/sort to be like it was when I paged away. How do you save/restore the datatable state?
PrimeFaces version: whatever is the latest
Mojarra version: whatever is the latest
GlassFish & Tomcat version: whatever is the latest
Chrome & Firefox version: whatever is the latest
And a little bit of IE
Mojarra version: whatever is the latest
GlassFish & Tomcat version: whatever is the latest
Chrome & Firefox version: whatever is the latest
And a little bit of IE
Hi,
I just found this post which is exactly why I'm trying to do. Is this still unanswered? Currently I could save the filters using:
and storing this in a attribute of a session scope backing bean. Then I can restore them using
However, while the loaded table is correctly filtered, the filters values doesn't appear in the column headers, which is rather inconsistent.
Does anyone have an idea on how to do this?
Thanks
I just found this post which is exactly why I'm trying to do. Is this still unanswered? Currently I could save the filters using:
Code: Select all
DataTable d = getTabComponent("....");
Map<String,String> storedFilters = d.getFilters()
Code: Select all
DataTable d = getTabComponent("....");
d.setFilters( storedFilters )
Does anyone have an idea on how to do this?
Thanks
-
- Information
-
Who is online
Users browsing this forum: Majestic-12 [Bot] and 30 guests