2 Replies Latest reply on Sep 28, 2007 1:25 PM by dennisbyrne

    ClientFacade.clickCommandLink(

    forsage

      Steps to repro (on JSF RI 1.2, MyFaces Tomahawk 1.1.5, GlassFish v2 b58):

      JSP:

      <h:form id="myForm">
      <t:commandLink id="clInsert"/
      action="#{myBean.insert}"
      value="Insert This!"/>
      </h:form>

      Java:

      public String insert() {
      // Some EJB actions here, looks nice
      return "list"; // A working navigation case
      }

      JSFUnit:

      public void testInsert() {
      JSFClientSession client = new JSFClientSession("/faces/Insert.jsp");
      JSFServerSession server = new JSFServerSession(client);

      // t:commandLink pressed by JSFUnit correctly, EJB call is done perfectly, stuff is in DB
      this.client.clickCommandLink("clInsert");
      server = new JSFServerSession(this.client);
      // Throws:
      // java.lang.NullPointerException at org.jboss.jsfunit.facade.JSFServerSession.getCurrentViewId(JSFServerSession.java:61)
      assertEquals("/jsf/autorelationtype/New.jsp", server.getCurrentViewId());
      }