2 Replies Latest reply on Jun 11, 2008 10:37 AM by Daniel Nielsen

    s:button and timouts

    Daniel Nielsen Newbie


      I've been searching high and low for a solution to my little problem.

      I have a conversation where navigation sometimes is based on the output of method called when the user presses a <s:button> or <h:commandButton> depending on whether I need the form submitted. Fx: <s:button action="#{myComponent.navigation(foo)}" value="DoStuff"/>

      However, now I'm trying to make conversation timeouts behave nicely. I have <restrict />'s on my pages, making the application redirect correctly to the login page when performing actions.

      Now the weird part is, if the user clicks the <s:button> the linked action is invoked no matter what. A new component is instantiated and all state is blank. This means that the action fails miserably and the user sees debug pages.

      If the user clicks <h:commandButton>, the view cannot be restored and he is redirected to the home page for the application, which is what I expect.

      How do you handle session/conversation timeouts with <s:button>? I cannot figure out a nice way to do it.

      Any clues?


        • 1. Re: s:button and timouts
          Nikos Paraskevopoulos Novice

          Hello, perhaps annotating your methods with org.jboss.seam.annotations.Conversational and specifying <pages no-conversation-view-id="..."> in pages.xml could do it.

          • 2. Re: s:button and timouts
            Daniel Nielsen Newbie

            Hi. Thanks for the reply. Unfortunately that doesn't help.

            Another thing I've noticed is that even though I have the following in my pages.xml, a Facelet error page with a javax.ejb.EJBTransactionRolledbackException is still shown to the user.

            <exception class="java.lang.Exception">
              <redirect view-id="/errors/error.xhtml">
                <message severity="error">
                  Internal server error. 

            It seems to me that the exception handling capabilities of seam is not quite there yet. I use seam 2.0.2.SP1.