4 Replies Latest reply on Jul 15, 2009 7:07 AM by Ilya Shaikovsky

    unable to center text for header and cells in scrollableData

    Arbi Sookazian Master

      RF 3.3.x

      all header and cell values are left-justified. plz explain how to center both. thx.

      foo.css:

      .rich-table {
       white-space:nowrap;
       cellpadding:5px;
       text-align:center;
      
      }
      
      .rich-table-cell
      {
       padding:5;
       font-weight: bold;
       white-space:nowrap;
       text-align: center;
      
      }
      
      .rich-subtable-cell,
      .rich-subtable-footercell, .rich-table-headercell,
      .rich-table-footercell, .rich-table-header, .rich-table-subheadercell, .rich-table-row
      {
       padding:5;
       font-weight: bold;
       white-space:nowrap;
       text-align: center;
      
      }


      xhtml:

      <rich:scrollableDataTable id="equipmentProcessingDataTableId"
       value="#{equipmentProcessingList}"
       var="listVal"
       width="700px"
       height="250px"
       rendered="#{equipmentProcessingList.getRowCount() > 0}">
      
      
       <rich:column sortable="false">
       <f:facet name="header"><h:outputText value="Site"/></f:facet>
       <h:outputText value="#{listVal[0]}"/>
       </rich:column>
       <rich:column sortable="false">
       <f:facet name="header"><h:outputText value="Account Number"/></f:facet>
       <h:outputText value="#{listVal[1]}"/>
       </rich:column>
       <rich:column sortable="false">
       <f:facet name="header"><h:outputText value="Occurrence"/></f:facet>
       <h:outputText value="#{listVal[2]}"/>
       </rich:column>
       <rich:column sortable="false">
       <f:facet name="header"><h:outputText value="Item Number"/></f:facet>
       <h:outputText value="#{listVal[3]}"/>
       </rich:column>
       <rich:column sortable="false">
       <f:facet name="header"><h:outputText value="Serial Number"/></f:facet>
       <h:outputText value="#{listVal[4]}"/>
       </rich:column>
       <rich:column sortable="false">
       <f:facet name="header"><h:outputText value="Equipment Type"/></f:facet>
       <h:outputText value="#{listVal[5]}"/>
       </rich:column>
       <rich:column sortable="false">
       <f:facet name="header"><h:outputText value=""/></f:facet>
       <h:commandLink value="History" action="#{equipmentProcessing.getHistory}"/>
       </rich:column>
      
       </rich:scrollableDataTable>