1 Reply Latest reply on Jun 2, 2010 12:10 PM by Johannes Freudendahl

    how to center header contents in rich:dataTable?

    Johann Igzorn Newbie

      hi!

      have a look at the following one-column-table:

       

      <rich:dataTable value="#{Bean.dataList}" var="list" id="logtable">
                      <rich:column>
                          <f:facet name="header">
                               <h:panelGrid>
                                   <h:commandLink value="Id" actionListener="#{Bean.sort}"/>
                                   <h:inputText value="#{Bean.id}"/>

                               </h:panelGrid>
                          </f:facet>


                          <h:outputText value="#{list.id}" />
                      </rich:column>

      </rich:dataTable>

       

      there's a strange behaviour there:

      if the column-data (list.id) is wider than the header contents, the header contents aren't centered.

      if the header contents are wider (e.g. by adding size="500" to the inputText) the header is centered.

       

      any idea how to center the header in the first case?

      i've tried to change some of the dataTable's css properties, but without success.

      thanks for your help.