2 Replies Latest reply on Feb 15, 2012 2:47 PM by Tony Herstell

    conversation id is null when f:param in f:facet

    H Dam Newbie

      Hi,

      I have the following code (using primefaces):

       

      <p:dataTable value="#{userList}" var="_user" id="userList">
         <p:column>
            <f:facet name="header">
               <p:commandButton action="#{userController.create}"
                  update=":userFormId:userInfoId" value="create"
                  oncomplete="userDlg.show()">
                  <f:param name="cid" value="#{javax.enterprise.context.conversation.id}" />
               </p:commandButton>
            </f:facet>
            <p:commandButton action="#{userController.modify(_user.id)}"
               update=":userFormId:userInfoId" value="modify"
               icon="ui-icon-disk" oncomplete="userDlg.show()">
               <f:param name="cid" value="#{javax.enterprise.context.conversation.id}" />
            </p:commandButton>
         </p:column>
      ........
      
      

       

      When I click button "modify", everything is OK, but if I click button "create", I have error Non exist conversation. I handle exception, this is error

       

      org.jboss.weld.context.NonexistentConversationException: WELD-000321 No conversation found to restore for id null
      

       

      However, if I change code as the following, when click button "create"/"modify" everything is OK.

       

      <p:dataTable value="#{userList}" var="_user" id="userList">
         <p:column>
            <f:facet name="header">
      
            </f:facet>
                      <p:commandButton action="#{userController.create}"
               update=":userFormId:userInfoId" value="create"
               oncomplete="userDlg.show()">
               <f:param name="cid" value="#{javax.enterprise.context.conversation.id}" />
            </p:commandButton>
            <p:commandButton action="#{userController.modify(_user.id)}"
               update=":userFormId:userInfoId" value="modify"
               icon="ui-icon-disk" oncomplete="userDlg.show()">
               <f:param name="cid" value="#{javax.enterprise.context.conversation.id}" />
            </p:commandButton>
         </p:column>
      ........
      
      

       

      What is it wrong? Please help me. Thank you.