views:

474

answers:

1

Is it possible to keep the filterBy value of a rich:datatable rich:column filterBy="..." in SESSION scope?

A: 

Yes, use el expression pointing to property of bean that is put in session scope.

<rich:datatable ...>
 <rich:column filterValue="#{yourSessionBean.filterByProperty}" ... >
...

I'm assuming you want to store filterValue not filterBy.

cetnar
It's not that easy... filterBy points to a field of the entity used to fill the datatable. So I can't simply use a session bean. If the datatable loops with value="#{myEntities} var="e" than I use something like filterBy="#{e.field}".
Daniel Bleisteiner
@Daniel So you need store `filterValue` attribute value not `filterBy`. Am I right?
cetnar
Ah... this might be a solution... I'll test it. Thanks so far.
Daniel Bleisteiner
This works quite well... thanks!
Daniel Bleisteiner