1 Reply Latest reply on Oct 2, 2008 5:13 PM by Pete Muir

    Unwanted conversation timeout message

    Jason Grant Newbie
      I have a Seam 2.10A1 application with many views that are accessed via a menu, and a general functional requirement is to start a new conversation when a menu item is selected.

      To do this, I have a custom HtmlPanelMenuItem that ends the current conversation before redirecting to the relevant view (code snippet [1] below).

      This works nicely, but produces a  warning if the user clicks the menu within approx 0.5sec after a previous click.  The FacesMessage is "The conversation ended, timed out or was processing another request".

      This message is added by SeamPhaseListener.afterRestoreView() when Pages.instance().redirectToNoConversationView() is ultimately called.

      I don't want my users to see this warning, but the redirect method above always sets this message, which implies to me that either my approach in [1] is questionable, or Seam should be more forgiving about the lack of conversation during a [quick] redirect.  Note that the message only arises if the user clicks quickly - this makes me wonder if it's a bug.

      I'd be grateful for advice on alternative approaches or workarounds.

      Thanks, Jason.

      [1] Logic from my HtmlPanelMenuItem

      |// Define an action that will redirect based on params
      panelItem.setActionExpression("#{menuHelper.navigate}")
      uiParam.setName("to-view") ;
      uiParam.setValue("jason.xhtml");

      // In the action...
      Conversation conversation = Conversation.instance();
      conversation.endBeforeRedirect();
      Redirect redirect = Redirect.instance();
      redirect.setViewId(anIdTakenFromTheParamAbove);
      redirect.setConversationPropagationEnabled(false);
      redirect.execute();|