hello,
is there any event on the dataTable when the user use the filter? onFilter or something like that?
I got 2 data tables...the 1st on filters the second one...it's go so far.
When I got a item picked from the fist one and another on the second one...I use the filter on the first on...and this cause the problem, because the first table loses the selection and I don't have an event to reset the second one...
any suggestion?
best regards,
la00
dataTable filter event
-
- Posts: 46
- Joined: 17 Sep 2011, 11:53
I don't know if this will help the situation you describe, but 3.0.M3 DataTable events are as follows:
There may be others of which I am unaware, but these are the ones I saw in the source code.
- rowSelect (SelectEvent)
rowUnselect (UnselectEvent)
page (PageEvent)
sort (SortEvent)
filter (AjaxBehaviorEvent)
rowEdit (RowEditEvent)
colResize (ColumnResizeEvent)
Code: Select all
<p:dataTable id="tableID" ...>
<p:ajax event="rowSelect" update="@this"/>
<p:ajax event="rowUnselect" update="@this"/>
<p:ajax event="page" listener="#{viewScopedManagedBean.onPage}"/>
<p:ajax event="sort" listener="#{viewScopedManagedBean.onSort}"/>
<p:ajax event="filter" listener="#{viewScopedManagedBean.onFilter}"/>
column definitions etc...
</p:dataTable>
Code: Select all
public void onPage(PageEvent event) {
//do stuff
}
public void onSort(SortEvent event) {
//do stuff
}
public void onFilter(AjaxBehaviorEvent event) {
//do stuff
}
PrimeFaces 3.5
JSF 2.1
Mojarra 2.1.3
Glassfish 3.1.1
Netbeans 7.0.1
JDK 7
JEE 6
JSF 2.1
Mojarra 2.1.3
Glassfish 3.1.1
Netbeans 7.0.1
JDK 7
JEE 6
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Code: Select all
p:ajax event="filter" ...
-
- Posts: 71
- Joined: 21 Feb 2011, 18:37
yeah that's nice...but I'm stuck on a pre M1 snapshot...
do you have any idea for this case?
do you have any idea for this case?
<p:ajax event="filter" listener="#{viewScopedManagedBean.onFilter}"/>Cool Mr Ice wrote:I don't know if this will help the situation you describe, but 3.0.M3 DataTable events are as follows:
Example...
- rowSelect (SelectEvent)
rowUnselect (UnselectEvent)
page (PageEvent)
sort (SortEvent)
filter (AjaxBehaviorEvent)
rowEdit (RowEditEvent)
colResize (ColumnResizeEvent)Code: Select all
<p:dataTable id="tableID" ...> <p:ajax event="rowSelect" update="@this"/> <p:ajax event="rowUnselect" update="@this"/> <p:ajax event="page" listener="#{viewScopedManagedBean.onPage}"/> <p:ajax event="sort" listener="#{viewScopedManagedBean.onSort}"/> <p:ajax event="filter" listener="#{viewScopedManagedBean.onFilter}"/> column definitions etc... </p:dataTable>
There may be others of which I am unaware, but these are the ones I saw in the source code.Code: Select all
public void onPage(PageEvent event) { //do stuff } public void onSort(SortEvent event) { //do stuff } public void onFilter(AjaxBehaviorEvent event) { //do stuff }
Hi,
is there a way to get selected filter option in filter event listener? i want to do a two-level filter that when first filter changes, second filter options decreases in number depends on first choice. is it possible on datatable? i want to use filter attributes if possible, not selectone etc.
thanks
-
- Information
-
Who is online
Users browsing this forum: No registered users and 35 guests