jsf - Primeface datatable.filter() and url parameter -


i have .xhtml model primeface datatable in it. call page url this: http://localhost:8080/myproject/mypage.jsf?id=51&startdate=04-05-2015&name=whatever

the url parameters used retrieve displayed in datatable, allow me filter content. used url parameter because page displayed when select row in datable have make manual redirect page on baking bean.

however everytime use 1 of primeface functionality sorting or pagination primeface seems ajax call backing bean without parameters, every object displayed instead of filtered list of objects.

therefore how can force primefaces use these parameters? or how can passe them primeface scope (they @managedproperty on backing bean)

the best , easiest way use omnifaces utility library , more <o:form>.

from documentation:

the <o:form> component extends standard <h:form> , provides way keep view or request parameters in request url after post-back

...

you can use same way <h:form>, need change h: o:.

so, replace <h:form> either

<o:form includerequestparams="true"> 

or

<o:form userequesturi="true"> 

see also:


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -