Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      63

      Description

      The page below causes the Javascript error "components has no properties".
      Appears to be related to a parse error, probably caused by nested CDATA sections
      in the AJAX response.

      sayhello.jsp:

      <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@taglib prefix="jsfExt" uri="http://java.sun.com/jsf/extensions/dynafaces"%>
      <html>
      <body>
      <f:view>
      <h:form>

      <jsfExt:ajaxZone id="zone0" >
      <h:inputText value="#

      {bean.name}" />

      <h:commandButton value="Say Hello" />

      <h:outputText value="Hello #{bean.name}

      "/>
      </jsfExt:ajaxZone>

      </h:form>
      </f:view>
      </body>
      </html>

      AJAX Response (from Firebug):

      <partial-response><components><render
      id=\"j_id_jsp_1767614457_1:zone0\"><markup><![CDATA[<div
      id=\"j_id_jsp_1767614457_1:zone0\"><input type=\"text\"
      name=\"j_id_jsp_1767614457_1:zone0:j_id_jsp_1767614457_3\" value=\"Bob\"
      /><input type=\"submit\"
      name=\"j_id_jsp_1767614457_1:zone0:j_id_jsp_1767614457_4\" value=\"Say Hello\"
      />Hello Bob<script language=\"javascript\"
      type=\"text/javascript\">\n//<![CDATA[\n\nvar curZone =
      null;\n\nDynaFacesZones.ajaxifyChildren($('j_id_jsp_1767614457_1:zone0'), {
      });\n//]]>\n</script></div>]]></markup></render></components><state><![CDATA[j_id1:j_id5]]></state></partial-response>

      Backing Bean:

      public class Bean {

      private String name;

      public String getName()

      { return name; }

      public void setName(String firstName)

      { this.name = firstName; }

      }

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Created an attachment (id=16)
          WAR of this example

          Show
          Ed Burns added a comment - Created an attachment (id=16) WAR of this example
          Hide
          iamnoah added a comment -

          If you look at the jsf-api-1.2.jar in your war, it doesn't contain any class
          files, only source, although that doesn't seem to matter on glassfish. For
          tomcat6 I had to add my copy of jsf-api and jsf-impl and the jstl jar. Once it
          was running, I had the same problem as described in issue 64, which prevents me
          from reproducing this issue.

          On glassfish, it worked fine and I didn't add any jars.

          My stack:
          Tomcat 6.0.9
          jstl 1.1.0
          JSF 1.2_03-b09-FCS (api and impl)
          jsf-extensions rc2
          Kubuntu 6.10
          Firefox 2.0.0.1

          I also binary diffed the jsf-impl.jar from glassfish with my copy and they do
          differ (but both say they are 1.2_03-b09-FCS) as do my copy of the dynafaces
          jars from rc2 with the ones in your WAR.

          Additionally, if I replace my copy of the jsf-impl.jar with the one from the
          glassfish lib dirrectory I get
          NoClassDefFoundError: com/sun/org/apache/commons/digester/RuleSet on startup.

          So, in short, we are not working with the same jars, although how different they
          are, I don't know. I got mine from
          https://javaserverfaces.dev.java.net/files/documents/1866/44998/jsf-1_2_03.zip
          and
          https://jsf-extensions.dev.java.net/files/documents/4613/50755/jsf-extensions-0.1.tar.gz
          The jstl jar is from Maven.

          Show
          iamnoah added a comment - If you look at the jsf-api-1.2.jar in your war, it doesn't contain any class files, only source, although that doesn't seem to matter on glassfish. For tomcat6 I had to add my copy of jsf-api and jsf-impl and the jstl jar. Once it was running, I had the same problem as described in issue 64, which prevents me from reproducing this issue. On glassfish, it worked fine and I didn't add any jars. My stack: Tomcat 6.0.9 jstl 1.1.0 JSF 1.2_03-b09-FCS (api and impl) jsf-extensions rc2 Kubuntu 6.10 Firefox 2.0.0.1 I also binary diffed the jsf-impl.jar from glassfish with my copy and they do differ (but both say they are 1.2_03-b09-FCS) as do my copy of the dynafaces jars from rc2 with the ones in your WAR. Additionally, if I replace my copy of the jsf-impl.jar with the one from the glassfish lib dirrectory I get NoClassDefFoundError: com/sun/org/apache/commons/digester/RuleSet on startup. So, in short, we are not working with the same jars, although how different they are, I don't know. I got mine from https://javaserverfaces.dev.java.net/files/documents/1866/44998/jsf-1_2_03.zip and https://jsf-extensions.dev.java.net/files/documents/4613/50755/jsf-extensions-0.1.tar.gz The jstl jar is from Maven.
          Hide
          Ryan Lubke added a comment -

          >Additionally, if I replace my copy of the jsf-impl.jar with the one from the
          >glassfish lib dirrectory I get
          >NoClassDefFoundError: com/sun/org/apache/commons/digester/RuleSet on startup.

          Just to clear the difference between the jsf-impl.jar and that from the
          javaserverfaces site - the GlassFish version of the jar doesn't include any of
          the com.sun.org clases as those classes are included in the appserv-rt.jar. The
          standlone build however does include them.

          Show
          Ryan Lubke added a comment - >Additionally, if I replace my copy of the jsf-impl.jar with the one from the >glassfish lib dirrectory I get >NoClassDefFoundError: com/sun/org/apache/commons/digester/RuleSet on startup. Just to clear the difference between the jsf-impl.jar and that from the javaserverfaces site - the GlassFish version of the jar doesn't include any of the com.sun.org clases as those classes are included in the appserv-rt.jar. The standlone build however does include them.
          Hide
          iamnoah added a comment -

          Can close this issue. Other than having to use the workaround in issue 64, this
          example works. Sorry for the confusion.

          Show
          iamnoah added a comment - Can close this issue. Other than having to use the workaround in issue 64, this example works. Sorry for the confusion.
          Hide
          Rajiv Mordani added a comment -

          Closing the bug per user comments.

          Show
          Rajiv Mordani added a comment - Closing the bug per user comments.

            People

            • Assignee:
              Ed Burns
              Reporter:
              iamnoah
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: