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

ClassCastException in HtmlDataTable newspaperColumns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 1.1.7
    • None
    • Extended Datatable
    • None
    • myFaces 1.1.5, tomahawk 1.1.7, richfaces 3.1.5

    Description

      Following ClassCast Eception is thrown if I use an EL expression in the newspaperColumns attribute:

      java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
      at org.apache.myfaces.component.html.ext.HtmlDataTable.getNewspaperColumns(HtmlDataTable.java:453)
      at org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.getNewspaperColumns(HtmlTableRenderer.java:81)
      at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:250)
      at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:140)
      at org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:280)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:527)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:415)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:418)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:418)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:418)
      at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401)
      at org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer.encodeEnd(HtmlGroupRenderer.java:71)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
      at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:286)

      sample usage:
      <t:dataTable id="l" forceId="true"
      value="#

      {MyController.myList}

      "
      newspaperOrientation="horizontal"
      newspaperColumns="#

      {MyController.showFoo?7:8}

      "

      Pls see also TOMAHAWK-728 newspaperColumns attribute ignores EL expression.
      I provided a patch there but it is has not been applied and 728 has been set to fixed although it is not working!

      Attachments

        Activity

          People

            Unassigned Unassigned
            mheinen Michael Heinen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: