2 Replies Latest reply on Oct 12, 2009 2:36 PM by giomiano

    Alignment of h:column

    evejeba
      While using <h:column> within <h:dataTable>, by default the contents of the table gets left aligned while the table header remains aligned at the center. Moreover the table header has properties for sorting the table contents. I want the table header and the contents to be left aligned. I tried using <div align="left"> and style="text-align: center;", but i am not able to achieve what i want. What changes do i have to make in order to achieve what i need.

      <rich:dataTable id="personList"
                      var="_person"
                    value="#{personList.resultList}"
                 rendered="#{not empty personList.resultList}">
          <h:column>
              <f:facet name="header">
                  <ui:include src="/layout/sort.xhtml">
                      <ui:param name="entityList" value="#{personList}"/>
                      <ui:param name="propertyLabel" value="First Name"/>
                      <ui:param name="propertyPath" value="person.firstName"/>
                  </ui:include>
              </f:facet>
              <h:outputText id="name" value="#{_person.firstName}">               
          </h:column>
      </rich:dataTable>

        • 1. Re: Alignment of h:column
          clerum

          This ia a question for the richfaces forum, not seam...but take a look at using <rich:column> as well as headerClass and columnClass

          • 2. Re: Alignment of h:column
            giomiano

            1. I do not understand why you are using

            <h:column>

            inside
            <rich:dataTable>


            2.
            <rich:column style="text-align: center;"> </...>



            does work
            3. It is css related


            Lets try to keep this forum clean