primefaces, default loading, and jsf @conversation scope bean


I am using primefaces 3.2 and mojarra 2.1.7 with jboss 6.1. I am trying to build a lazy loading datatable. In one of the datatable columns I have a commandlink to call a edit method. If my bean is conversation scoped, the edit method is not called. If it is view scoped then it gets called. I cant have a conversation scoped bean to work with a lazy loading datatable?

public class UserBean implements Serializable, UserBeanLocal {

   private static final long serialVersionUID = 1L;

   private Conversation conversation;
   private UserManagerBeanLocal userController;
   private transient FacesContext context;

   private User user;

   private LazyUserDataModel lazyModel;

   public UserBean() {
      user = new User();

   public void createLazyDataModel() {
      setLazyModel(new LazyUserDataModel(userController));

   public void ejbPassivate(){
      context = null;

   public void ejbActivate() {

   public String create() {
      return "create";

   public String edit()
      System.out.println("editing user");
      return "create";



<p:dataTable id="userTable" var="usr" value="#{userBean.lazyModel}"
            paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
            rowsPerPageTemplate="5,10,15" paginatorPosition="bottom" rows="10"
            currentPageReportTemplate="{currentPage} de {totalPages}">
            <p:column headerText="Username">
               <h:outputText value="#{}" />
               <p:commandLink value="Edit" action="#{userBean.edit}" actionListener="#{userBean.update}" update="userTable" />


Can anybody help?



Well, it certainly should work. There is nothing obviously wrong with your code, but I suspect from the snippet you are providing that you have some "try and error" history...;-)

Try to debug the conversation and see which conversation is addressed (and when). Are you propagating the conversation-id correctly?

When you write ViewScoped works - did you include Seam 3 for bridging JSF-scopes to CDI, or can it be that you are mixing JSF and CDI scopes?

And: Don't put any EJB code in the constructor as you don't have any guarantee when (and how often) this will be called. Better to use @PostConstruct instead.