5 Replies Latest reply on Apr 17, 2008 9:37 PM by kragoth

    JSFUnit (richfaces) redirect issue continued...

    kragoth

      This is a continuation of the thread
      http://jboss.com/index.html?module=bb&op=viewtopic&t=132892

      Ok, now that we have the redirect working by using

      RichFacesClient rclient;
      ...
      public void clickDetailsMenuTenureOption() throws IOException, SAXException
      {
       rclient.ajaxSubmit("tenureMenuOptions");
      }
      


      I have run into another issue. When I use this approach for drop down menus that redirect to another page I lose my conversation.

      For example when using a browser this is what happens:


      Go to home page
      Click Tenure search -> redirects to search page
      Click Search -> shows search results
      Click result link -> redirects to maintenance page (START CONVERSATION)
      Click drop down menu option (show main account) -> redirects to account page (This pages uses the main account of the tenure that was selected in the conversation)


      Ok, now this is what happens when I run the same thing in a jsfunit test

      Go to home page
      Click Tenure search -> redirects to search page
      Click Search -> shows search results
      Click result link -> redirects to maintenance page (START CONVERSATION)
      Click drop down menu option (show main account) -> redirects to account page (This pages uses the main account of the tenure that was selected in the conversation) At this point the JSFUnit test fails becuase the converstaion does not exist. So when it tries to lookup the main account for the selected tenure it gets a NullPointer exception.


      So, somewhere in the implementation of how we click on drop down menus any existing conversation is being lost.

      Any ideas as to why and how this can be fixed?