2 Replies Latest reply on Nov 27, 2012 5:29 AM by mabu2

    rich:(extended)dataTable column width

    mabu2 Newbie

      Hi @all,

       

      maybe this is the thousandth post for this topic. Sorry therefore, but I didn't found a working solution neither in this forum nor with google . And I can't believe that this great framework is not able to solve this simple elementary problem:

       

      I need a (data)table with a fixed width, each column with a defined (fixed/relative) width and a header (facet). I guess I tried every combination (columnClasses with rich:datatable, style styleClasses with rich:column, style: table-layout:fixed, and,and , and ...)

       

      For example this does not work: the width-attribute of the column is ignored (color works!), both columns have the same size!

       

      <rich:dataTable value="#{bean.data}" var="x" id="table" style="width:300px;table-layout:fixed;word-wrap:break-word;">

                      <rich:column style="width:100px;color:red;">

                          <f:facet name="header">

                              <h:outputText value="Col1" />

                          </f:facet>

                          <h:outputText value="#{x.col1}" />

                      </rich:column>

                      <rich:column style="width:200px;color:green;">

                          <f:facet name="header">

                              <h:outputText value="Col2" />

                          </f:facet>

                          <h:outputText value="#{x.col2}" />

                      </rich:column>

      </rich:dataTable>

       

      Anyone a tested and working codetemplate?

       

      thx