Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-1274

rich:dataGrid renders malformed XML

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.1.3, 3.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      OS X 10.4.10, Richfaces 3.1.2, Seam 2.0CR3

      Description

      The following is rendered directly by Richfaces:

      <tbody>
      <td class="dr-table-cell rich-table-cell "> </td>
      </tr>
      </tbody>

      Here is the smallest possible facelets page in my application that produces the symptom.

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a="https://ajax4jsf.dev.java.net/ajax"
      xmlns:rich="http://richfaces.ajax4jsf.org/rich"
      template="layout/template.xhtml">

      <ui:define name="body">
      <h:form>
      before empty field <h:inputText id="searchInput"
      value="#

      {obligorController.searchString}

      " />after empty field
      </h:form>
      <rich:dataGrid id="obligorDataTable" columns="1" var="obligorRow"
      value="#

      {obligorRows}

      ">
      <f:facet name="header">Hi there</f:facet>
      Some content
      </rich:dataGrid>
      </ui:define>
      </ui:composition>

      The full rendered output, including the error shown above, is:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <link rel='stylesheet' type='text/css' href='/WebLock/a4j_3_1_2.GAcss/table.xcss/DATB/eAFz6V2jBAAENQGg' /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>WebLock: Funds Transfer Pricing</title>
      <link href="http://localhost:8080/WebLock/stylesheet/weblock_styles.css" rel="stylesheet" type="text/css" />
      <script language="JavaScript" src="http://localhost:8080/WebLock/scripts/weblock.js"></script>
      </head>

      <body>

      <div class="body">

      <form id="j_id2" name="j_id2" method="post" action="/WebLock/home.seam" enctype="application/x-www-form-urlencoded">
      <input type="hidden" name="j_id2" value="j_id2" />

      before empty field<input id="j_id2:searchInput" type="text" name="j_id2:searchInput" />after empty field<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id128" />
      </form><table class="dr-table rich-table " id="obligorDataTable" border="0" cellpadding="0" cellspacing="0" rows="0"><colgroup span="1"></colgroup><thead><tr class="dr-table-header rich-table-header "><th class="dr-table-headercell rich-table-headercell " colspan="1" scope="colgroup">Hi there</th></tr></thead><tbody><td class="dr-table-cell rich-table-cell "> </td></tr></tbody></table>
      </div>

      </body>
      </html>

      I'm not sure how to dig into this further, but I'll be happy to help troubleshoot.

        Gliffy Diagrams

          Activity

          Hide
          stu2 Stuart Robertson added a comment -

          Thanks for looking at this quickly Anton.

          I'd like to request that this bug be targeted for 3.1.3. Here's what Firefox shows when it tries to display the output listed above:

          XML Parsing Error: mismatched tag. Expected: </tbody>.
          Location: http://localhost:8080/WebLock/home.seam?cid=1
          Line Number 144, Column 82:</th></tr></thead><tbody><td class="dr-table-cell rich-table-cell "> </td></tr></tbody></table><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id2" />
          ---------------------------------------------------------------------------------^

          I'll be happy to help provide more information and troubleshoot.

          Show
          stu2 Stuart Robertson added a comment - Thanks for looking at this quickly Anton. I'd like to request that this bug be targeted for 3.1.3. Here's what Firefox shows when it tries to display the output listed above: XML Parsing Error: mismatched tag. Expected: </tbody>. Location: http://localhost:8080/WebLock/home.seam?cid=1 Line Number 144, Column 82:</th></tr></thead><tbody><td class="dr-table-cell rich-table-cell "> </td></tr></tbody></table><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="_id2" /> ---------------------------------------------------------------------------------^ I'll be happy to help provide more information and troubleshoot.
          Hide
          abelevich Anton Belevich added a comment -

          fixed in the branch 3.1.* and trunk

          Show
          abelevich Anton Belevich added a comment - fixed in the branch 3.1.* and trunk
          Hide
          stu2 Stuart Robertson added a comment -

          Thanks for the quick turnaround!

          I just checked out the 3.1.3 branch, and the latest change has a compilation issue. Here's what I'm seeing from the maven build:

          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Compilation failure

          /Users/stuartrobertson/eclipse_workspaces/europa-workspace/richfaces-3.1.x-branch/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractGridRenderer.java:[105,94] incompatible types
          found : boolean
          required: java.lang.Boolean

          /Users/stuartrobertson/eclipse_workspaces/europa-workspace/richfaces-3.1.x-branch/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractGridRenderer.java:[106,27] incompatible types
          found : java.lang.Boolean
          required: boolean

          It looks like it's coming from this line:

          Boolean isCleanable = (null!=columns && columns.intValue()!=Integer.MIN_VALUE)? true:false;

          In the doCleanup() method.

          I think it should probably be:

          Boolean isCleanable = (null!=columns && columns.intValue()!=Integer.MIN_VALUE)? Boolean.TRUE: Boolean.FALSE;

          Show
          stu2 Stuart Robertson added a comment - Thanks for the quick turnaround! I just checked out the 3.1.3 branch, and the latest change has a compilation issue. Here's what I'm seeing from the maven build: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure /Users/stuartrobertson/eclipse_workspaces/europa-workspace/richfaces-3.1.x-branch/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractGridRenderer.java: [105,94] incompatible types found : boolean required: java.lang.Boolean /Users/stuartrobertson/eclipse_workspaces/europa-workspace/richfaces-3.1.x-branch/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractGridRenderer.java: [106,27] incompatible types found : java.lang.Boolean required: boolean It looks like it's coming from this line: Boolean isCleanable = (null!=columns && columns.intValue()!=Integer.MIN_VALUE)? true:false; In the doCleanup() method. I think it should probably be: Boolean isCleanable = (null!=columns && columns.intValue()!=Integer.MIN_VALUE)? Boolean.TRUE: Boolean.FALSE;
          Hide
          stu2 Stuart Robertson added a comment -

          Actually the simplest fix is just to make isCloneable a primitive boolean rather than a Boolean.

          boolean isCleanable = (null!=columns && columns.intValue()!=Integer.MIN_VALUE)? true:false;

          This seems to compile. Testing now...

          Show
          stu2 Stuart Robertson added a comment - Actually the simplest fix is just to make isCloneable a primitive boolean rather than a Boolean. boolean isCleanable = (null!=columns && columns.intValue()!=Integer.MIN_VALUE)? true:false; This seems to compile. Testing now...
          Hide
          abelevich Anton Belevich added a comment -

          fixed ... sorry

          Show
          abelevich Anton Belevich added a comment - fixed ... sorry
          Hide
          stu2 Stuart Robertson added a comment -

          Btw, the fix seemed to work. I've not gotten the malformed xml that I reported on since applying this version. Thanks a lot for the very quick turnaround.

          Show
          stu2 Stuart Robertson added a comment - Btw, the fix seemed to work. I've not gotten the malformed xml that I reported on since applying this version. Thanks a lot for the very quick turnaround.

            People

            • Assignee:
              ayanul Aleksej Yanul
              Reporter:
              stu2 Stuart Robertson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development