tomcat - Datalist Pattern with Jsf 2 and CDI -


i've class like...

@requestscoped public class userlist ... public list<user> getuserlist(){   return getentitymanager().createquery(getcriteria()).getresultlist();   //getcriteria() hard query need usertype parameter populated } } 

all pages can call class, each on different parameter, "usertype=a". values of these parameter stay on each managed bean(conversation scoped) of each page.

how or when populate datalist parameter? there pattern datalist jsf2 , cdi?

jsf doesn't provide data-list component out of box. can create own (look <ui:repeat/>) or use 1 of component libraries out there - tomahawk, primefaces, richfaces, name few.

as parameter - inject conversation scoped bean request scoped bean , read it.


Comments

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -