3 Replies Latest reply on Jan 10, 2008 8:23 AM by Stan Silvert

    RichFaces TabPanel - clickTab ... Nullpointer

    first name last name Newbie


      I just built the latest archive from the SVN repository (beta-2) and ran a test, but JSFUnit for RichFaces seems not to be compatible with all versions of RichFaces??

      I am trying to click a Tab on a <rich:tabPanel>, the according code in your implementation is

      private void clickServerTab(String tabPanelComponentID, String tabComponentID)
       throws SAXException, IOException
       String panelClientID = client.getClientIDs().findClientID(tabPanelComponentID);
       String tabClientID = client.getClientIDs().findClientID(tabComponentID);
       String formID = panelClientID + ":_form";
       WebForm form = client.getWebResponse().getFormWithID(formID);
       WebRequestFactory reqFactory = new WebRequestFactory(client);
       PostMethodWebRequest postRequest = reqFactory.buildRequest(form);
       postRequest.setParameter(formID + ":_idcl", tabClientID);
       postRequest.setParameter(tabClientID + "_server_submit",
       tabClientID + "_server_submit");

      The problem is, that in the source of my HTML page i cannot find ":_form" anywhere.. This is why - in a later step - the code fails with a Nullpointer Exception

      I am using
      - richfaces-ui-3.1.2.GA.jar
      - richfaces-impl-3.1.2.GA.jar
      - richfaces-api.3.1.2.GA.jar
      on JBoss 4.0.5.GA

      Do you know any solution to this?

      Thanks in advance.