2 Replies Latest reply: Jun 4, 2008 11:50 PM by Reid Swanson RSS

    rich:column wrap text

    Reid Swanson Newbie

      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.