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

    unable to center text for header and cells in scrollableData

    asookazian

      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>


        • 1. Re: unable to center text for header and cells in scrollable
          asookazian

          i just replaced rich:scrollableDataTable with rich:dataTable and it worked. what are the equivalent css elements for scrollableDataTable?

          is it .rich-scrollable-table?

          • 2. Re: unable to center text for header and cells in scrollable
            ilya_shaikovsky

            such questions could be easily answered by firebug plugin if docs not helps.

            • 3. Re: unable to center text for header and cells in scrollable
              asookazian

              I looked at the RF dev doc, this worked:

              .rich-sdt-column-cell, .rich-sdt-header-cell
              {
               padding:5;
               font-weight: bold;
               white-space:nowrap;
               text-align: center;
              
              }


              I just view www.getfirebug.com. Thx for the tip, I will try it out with FF3. Our corporate standard is IE and I'm currently using IE7. We are using NTLM authentication for our Seam apps. This is not possible with FF.

              This tool has many wonderful features. Is it ok to do JSF/RF/Seam development using FF (I can bypass authentication programmatically or enter my credentials every session for dev/test) and then go to IE in UAT/prod envmts?

              Or has the RF team seen a lot of bugs/differences between IE and FF and this would not be possible to do (i.e. I should just stay with IE for now)?

              Also, any Firebug-like plugins/functionality in IE8? thx.

              • 4. Re: unable to center text for header and cells in scrollable
                ilya_shaikovsky

                 

                This tool has many wonderful features. Is it ok to do JSF/RF/Seam development using FF (I can bypass authentication programmatically or enter my credentials every session for dev/test) and then go to IE in UAT/prod envmts?


                yes, you can. we have some minor cross-browser issues but not many. in general the results should be the same.

                Also, any Firebug-like plugins/functionality in IE8? thx.


                yes, IE8 shiped with really powerful debug/inspect/profile tool which we are using in development.