Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-1411

Conversation Switcher doesn't work with natural conversations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.GA_CP03_FP01
    • 4.3.0.GA_CP02_FP01
    • Seam
    • None
    • Release Notes

      Back port of the following issue:
      The Switcher component's (org.jboss.seam.faces.Switcher) switch() method does not work correctly when using natural conversations.
      The issue is related to line 102 (in trunk and in 2.0.2.CR1) where seam tests whether the selected item is an outcome or a conversation id:

      boolean isOutcome = conversationIdOrOutcome==null || !Character.isDigit( conversationIdOrOutcome.charAt(0) );

      The problem is that with natural conversations, the value of conversationIdOrOutcome is something like "accountEdit:4" so the switcher thinks it's a view.

      I copied the code from the Switcher and created a new component and replaced that line with:

      boolean isOutcome = conversationIdOrOutcome==null ||
      (!Character.isDigit(conversationIdOrOutcome.charAt(0)) && conversationIdOrOutcome.indexOf(':') < 0);

      and it works correctly. Of course this approach is naive, but it seems to work for me.

              mnovotny@redhat.com Marek Novotny
              mnovotny@redhat.com Marek Novotny
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: