1 Reply Latest reply on Sep 8, 2008 6:51 AM by Ilya Shaikovsky

    DataTable Example from richfaces-usersguide_3.2

    thexternal Newbie

      I am new be at richfaces. I am reading richfaces-usersguide_3.2 pdf and develop sample application using this book. When i examine <rich:dataTable> component, i try this code from book;
      <rich:dataTable value="#{capitalsBean.capitals}" var="cap" rows="5">
      <f:facet name="caption">
      <h:outputText value="United States Capitals" />
      </f:facet>
      <f:facet name="header">
      <h:outputText value="Capitals and States Table" />
      </f:facet>
      <rich:column>
      <f:facet name="header">State Flag</f:facet>
      <h:outputText value="#{cap.stateFlag}" />
      <f:facet name="footer">State Flag</f:facet>
      </rich:column>
      <rich:column>
      <f:facet name="header">State Name</f:facet>
      <h:outputText value="#{cap.state}" />
      <f:facet name="footer">State Name</f:facet>
      </rich:column>
      <rich:column>
      <f:facet name="header">State Capital</f:facet>
      <h:outputText value="#{cap.name}" />
      <f:facet name="footer">State Capital</f:facet>
      </rich:column>
      <rich:column>
      <f:facet name="header">Time Zone</f:facet>
      <h:outputText value="#{cap.timeZone}" />
      <f:facet name="footer">Time Zone</f:facet>
      </rich:column>
      <f:facet name="footer">
      <h:outputText value="Capitals and States Table" />
      </f:facet>
      </rich:dataTable>


      But columns in table is not displayed correctly.
      my column header, column data and column footer appear in same row and same column. For example:

      First Row == first columnheader + first column data + first column footer as first column.
      second columnheader + second column data + second column footer as second column
      .............................

      i am be aware of that i could not tell my problem clearly, but i hope that you can help me for solve my problem.
      Thanks