0 Replies Latest reply on May 3, 2013 12:37 PM by Cory Dahlstrom

    Seam 2.3 + JSF 2.x + dataTable  rendering question.

    Cory Dahlstrom Novice

      We are upgrading to Seam 2.3 from 2.1.1 and have a question.  We have a large Seam based application with many, many dataTables.  Here is an example of one:

       

      <h:dataTable

      value="#{locationResults}" var="location"

      rendered="#{locationResults.rowCount > 0 }" >

                  <h:column id="state">

                      <f:facet name="header">

                          <h:outputText value="State" />

                      </f:facet>

                      <h:outputText value="#{uiLocationHelper.getDescription(location.state)}" />

                  </h:column>

      </h:dataTable>

       

      The problem we are having is we are getting NullPointerExceptions all over the place when the dataModel(s) are empty.  In this example, the "getDescription()" method call gets the exception even though the dataTable should not be rendered.  Most all of our dataTables are inside of panels which are not rendered either.

       

      I can put a null check in the getDescription() method and it's fine, but my question is why is the getDescription() method getting called in the first place?  It obviously didn't call the method in prior versions of Seam/JSF.

       

      Thanks,

       

      Cory.