1 Reply Latest reply on Mar 16, 2009 10:43 PM by gonorrhea

    flushMode = MANUAL setting lasts beyond conversation?

    kellyrob

      I have what seems to be a fairly standard situtation :



      • a UserHome class supporting add/update/delete of new Users

      • a corresponding UserEdit.page.xml which includes
        <begin-conversation join="true" flush-mode="MANUAL"/>


      • navigation rules which explicitly end the conversation and redirect
        <navigation from-action="#{userHome.persist}">
                <rule if-outcome="persisted">
                    <end-conversation/>
                    <redirect view-id="/user/UserList.xhtml"/>
                </rule>
            </navigation>
            
            <navigation from-action="#{userHome.update}">
                <rule if-outcome="updated">
                    <end-conversation/>
                    <redirect view-id="/user/UserList.xhtml"/>
                </rule>
            </navigation>
        
            <navigation from-action="#{userHome.remove}">
                <rule if-outcome="removed">
                    <end-conversation/>
                    <redirect view-id="/user/UserList.xhtml"/>
                </rule>
            </navigation>
        




      This works as expected for the UserHome use-cases, but the flush-mode remains MANUAL after the conversation has ended, leading to unpredictable results in other areas of the application later on.
      My assumption is that because we are joining the present long-running conversation the flush-mode is set there and continues beyond the life-cycle of the UserHome.


      Is the appropriate answer to nest conversations(in which I assume the flush-mode would only affect the nested conversation) or is there some other convenient way to reset the flush-mode when the conversation is ended?


      Thanks in advance for any help on this particular problem.