Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      144

      Description

      When rendering XHTML, the current CommandLink Renderer will output something like:

      <!--
      <![CDATA[
      .....
      ]]>
      //-->

      This is one big comment and unreadable in Mozilla. Instead, follow
      ABCNews.com's examples and output:

      //<![CDATA[
      ......
      //]]>

        Activity

        Hide
        jayashri added a comment -

        Taking ownership

        Show
        jayashri added a comment - Taking ownership
        Hide
        jayashri added a comment -

        Jacob, can you please review this patch ? thanks

        Index: src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java
        ===================================================================
        RCS file:
        /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/C
        ommandLinkRenderer.java,v
        retrieving revision 1.32
        diff -u -r1.32 CommandLinkRenderer.java
        — src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java 9 Jun
        2005 22:
        37:47 -0000 1.32
        +++ src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java 16 Jul
        2005 00
        :52:02 -0000
        @@ -385,11 +385,12 @@
        String formName = myForm.getClientId(context);
        writer.startElement("script", component);
        writer.writeAttribute("type", "text/javascript", "type");

        • writer.writeAttribute("language", "Javascript", "language");
        • writer.write("<!--\n");
          + writer.writeAttribute("language", "Javascript", "language");
          if (isXHTML) { - writer.write("<![CDATA[\n"); - }

          + writer.write("//<![CDATA[\n");
          + } else

          { + writer.write("<!--\n"); + }

          writer.write("\nfunction ");
          String functionName = (CLEAR_HIDDEN_FIELD_FN_NAME + "_" +
          formName.replace(Nam
          ingContainer.SEPARATOR_CHAR, '_'));
          writer.write(functionName);
          @@ -414,9 +415,10 @@
          writer.write("\n}\n");

        if (isXHTML)

        { - writer.write("]]>\n"); - }
        • writer.write("//-->\n");
          + writer.write("//]]>\n");
          + } else { + writer.write("//-->\n"); + }

          writer.endElement("script");

        // say that we've already rendered the script for this form
        ~

        Show
        jayashri added a comment - Jacob, can you please review this patch ? thanks Index: src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java =================================================================== RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/C ommandLinkRenderer.java,v retrieving revision 1.32 diff -u -r1.32 CommandLinkRenderer.java — src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java 9 Jun 2005 22: 37:47 -0000 1.32 +++ src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java 16 Jul 2005 00 :52:02 -0000 @@ -385,11 +385,12 @@ String formName = myForm.getClientId(context); writer.startElement("script", component); writer.writeAttribute("type", "text/javascript", "type"); writer.writeAttribute("language", "Javascript", "language"); writer.write("<!--\n"); + writer.writeAttribute("language", "Javascript", "language"); if (isXHTML) { - writer.write("<![CDATA[\n"); - } + writer.write("//<![CDATA[\n"); + } else { + writer.write("<!--\n"); + } writer.write("\nfunction "); String functionName = (CLEAR_HIDDEN_FIELD_FN_NAME + "_" + formName.replace(Nam ingContainer.SEPARATOR_CHAR, '_')); writer.write(functionName); @@ -414,9 +415,10 @@ writer.write("\n}\n"); if (isXHTML) { - writer.write("]]>\n"); - } writer.write("//-->\n"); + writer.write("//]]>\n"); + } else { + writer.write("//-->\n"); + } writer.endElement("script"); // say that we've already rendered the script for this form ~
        Hide
        jhook added a comment -

        Looks Great! Again, we shouldn't need to support legacy browsers when XHTML is
        used (removing the <!-- -->).

        r=jhook

        Show
        jhook added a comment - Looks Great! Again, we shouldn't need to support legacy browsers when XHTML is used (removing the <!-- -->). r=jhook
        Hide
        jayashri added a comment -

        Fix checked in. Thanks Jacob

        Show
        jayashri added a comment - Fix checked in. Thanks Jacob
        Hide
        Manfred Riem added a comment -

        Closing out issue

        Show
        Manfred Riem added a comment - Closing out issue

          People

          • Assignee:
            jayashri
            Reporter:
            jhook
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: