2 Replies Latest reply on Jun 4, 2008 11:50 PM by desilentio

    rich:column wrap text

    desilentio

      Hi,

      I have a scrollableDataTable that has a column that contains an h:outputText.

      The text can be quite long and I would like to either be able to scroll horizontally to see the text or to wrap the text when it reaches the end of the column.

      relevant css

      .displayTable {
       margin-left: auto;
       margin-right: auto;
       padding: 10px 10px 10px 10px;
      }
      
      .oddRow {
       background-color: #BED6F8;
       width: 100%;
      }
      
      .evenRow {
       background-color: #E4EEFD;
       width: 100%;
      }
      


      relevant code
      <rich:scrollableDataTable
      id="tableId"
      var="row"
      value="#{myBean.list}"
      width="100%"
      styleClass="displayTable"
      rowClasses="oddRow,evenRow"
      >
      
       <rich:column
       sortable="false"
       >
      
       <h:outputText
       style="font-size: 1.5em;"
       value="#{row}"
       />
      
       </rich:column>
      </rich:scrollableDataTable>
      


      Right now this will produce columns that are the same width as the table but if the text is longer than the column then it is not accessible (i.e it doesn't wrap) and there is no horizontal scrollbar either.

      Any help greatly appreciated.


        • 1. Re: rich:column wrap text

          Hi DeSilentio,

          Try to redifine the next style:

          rich-table-subheadercell

          something like:

          .rich-table-subheadercell {
          width: 65px;
          }

          • 2. Re: rich:column wrap text
            desilentio

            Thanks for the response.

            However, that didn't seem to have any effect. (Including not changing the width of any of the cells.)

            I tried both:

            .rich-table-subheadercell
            and
            .rich-table-cell

            but neither seemed to do anything.

            Are these defined for scrollableDataTable or just dataTable?

            The text wraps fine in a normal dataTable but I need to have scroll bars so I'd prefer to use a scrollableDataTable.