JSF session issue
Posted
by user234194
on Stack Overflow
See other posts from Stack Overflow
or by user234194
Published on 2010-05-18T19:22:39Z
Indexed on
2010/05/18
21:10 UTC
Read the original article
Hit count: 249
I have got a situation where I have list of records say 10,000, I am using datatable and I am using paging,(10 records per display). I wanted to put put that list in the session as:
facesContext........put("mylist", mylist);
And in the getters of the mylist, I have
public List<MyClass> getMyList() {
if(mylist== null){
mylist= (List<MyClass>) FacesContext......getSessionMap().get("mylist");
}
return mylist;
}
Now the problem is whene ever i click on paging button to go to second page, only the first records are displayed, I know i am missing some thing, and I have few questions:
Is the way of putting the list in session correct. Is this the way I should be calling the list in my case.
Thnaks in advance...
© Stack Overflow or respective owner