0 Replies Latest reply on Jan 10, 2013 8:40 AM by kauedg

    extendedDataTable column header-specific style

    kauedg

      Using the following example code:

       

      <rich:extendedDataTable id="table"
                              value="#{bean.list}"
                              var="item" 
                              styleClass="listStyle">
      
          <rich:column id="itemId">
              <f:facet name="header">
                  <h:panelGroup>
                      <h:outputText value="ID" />
                  </h:panelGroup>
                  </f:facet>
                  <h:outputText value="#{item.id}" />
          </rich:column>
      
          <rich:column id="itemName">
              <f:facet name="header">
                  <h:panelGroup>
                      <h:outputText value="Name" />
                  </h:panelGroup>
                  </f:facet>
                  <h:outputText value="#{item.name}" />
          </rich:column>
      </rich:extendedDataTable>

       

       

      RichFaces generates the following source-code:

       

      <td>
          <div style="" class="rf-edt-rsz-cntr rf-edt-c-itemName">
              <div class="rf-edt-rsz"></div>
          </div>
          <div style="height: 20px;" class="rf-edt-hdr-c rf-edt-c-itemName">
              <div class="rf-edt-rsz"></div>
              <div class="rf-edt-hdr-c-cnt">Nome </div>
          </div>
      </td>
      

       

      Why it's generated a "rf-edt-c-itemName" but not a "rf-edt-hdr-c-itemName"? I ran into this when trying to set a column width to auto in the CSS class. If the ".itemName" width is set to auto, the column fits it's content but the header's size just fits it's own label.