Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1482

HtmlTableRendererBase produces invalid html if row is not available

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.9
    • 1.1.10
    • Extended Datatable
    • None
    • myfaces 1.2.8, tiles 2.0.7, richfaces 3.3.3.beta1

    Description

      The class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase produces invalid html if a row is not available.
      AJAX calls may fail in this case if invalid html is returned.

      See method encodeInnerHtml:
      for(int nr = 0; nr < newspaperRows; nr++){
      ...
      for(int nc = 0; nc < newspaperColumns; nc++) {
      ...
      if(!uiData.isRowAvailable())

      { log.error("Row is not available. Rowindex = " + currentRow); 295 break; }

      if (nc == 0)

      { ... renderRowStart(facesContext, writer, uiData, styles, nr); }

      ...
      }
      renderRowEnd(facesContext, writer, uiData);

      There is a break in link 295 and the inner loop is left. renderRowStart is not called but renderRowEnd is called!

      FIX:
      The call of "renderRowEnd(facesContext, writer, uiData)" must be in the inner loop as last statement (1 line before the current position)

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            mheinen Michael Heinen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: