After some experimentation, this appears to be an issue when using a CDI bean, and nothing to do with PrimeFaces which is what I originally assumed.
If I change the
Here's your first piece of advice with CDI and JSF - Never mix CDI with JSF annotations.
Your problem is that you use @javax.inject.Named a CDI annotation with javax.faces.bean.SessionScoped - a JSF annotation.
In CDI you would do:
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
@Named(value = "tableBeanLazy")
@SessionScoped
public class TableBeanLazy {...}
Note that the above will work perfectly fine with JSF.
In a pure JSF way you would do:
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ManagedBean;
@ManagedBean(value = "tableBeanLazy")
@SessionScoped
public class TableBeanLazy {...}
I would recommend sticking with CDI all the way. However, CDI currently does not provide an alternative for the JSF @javax.faces.bean.ViewScoped out of the box. To get it in CDI look into Apache Deltaspike.