5 Replies Latest reply on Jan 24, 2007 5:35 PM by Siarhei Dudzin

    h:commandButton requires s:conversationId to work properly

    Siarhei Dudzin Apprentice

      Hi all,

      From what I understand conversation id is propagated across post requests. I have a case where I visit a page via s:link (all participating beans are conversation scoped and the action in the link has @Begin(join=true) ):

      <s:link id="editLnk" value="#{message['edit']}" action="#{regionAction.submitEditGisArticle}"
       rendered="#{user.admin}" styleClass="texttoolbar" />

      On the resulting page I have a h:form with a h:commandButton however when I click the button apparently a new conversation started for some reason (which causes RequiredException as a result because some beans in the previous conversation are not present in the new conversation). The only way to avoid starting the new conversation is to put s:conversationId inside the h:commandButton and this works:

      <h:commandButton id="submitBtn" value="#{message['save']}"
       action="#{articlesHandler.submitEditedGeneralArticle}" >

      Am I missing something? Why the conversation isn't propagated with the POST request this time?

      Thanks in advance,
      Siarhei Dudzin