3 Replies Latest reply on Jun 18, 2010 2:08 PM by Tom Todaro

    extendedDataTable text wrap

    Tom Todaro Newbie

      Does anyone have an example of how to wrap cell text in an extendedDataTable?  The rich:datatable had this styling right out of the box, but extendedDataTable does not. I've done a lot of Web searching to find an answer, but no luck so far.  v 3.3.2.

        • 1. Re: extendedDataTable text wrap
          Ilya Shaikovsky Master

          you could wrap the text incolumn with div with wrapping css applied and sizes set.

          • 2. Re: extendedDataTable text wrap
            Lucian Ooo Newbie

            Try this:

             

            1. define this style sheet

            .hardBreak

             

            {
            white-space: pre-wrap;       /*  css-3 */
            white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
            white-space:  -pre-wrap;      /* Opera 4-6 */
            white-space: -o-pre-wrap;    /*  Opera 7 */
            word-wrap: break-word;       /* Internet Explorer 5.5+ */

            }

             

            2. in you extendedDataTable:

             

            <rich:column sortable="false" sortBy="#{mptv.description}" width="200px"
                                 label="Description">
                        <f:facet name="header">
                            <h:outputText value="Description"/>
                        </f:facet>
                        <s:div styleClass="hardBreak">
                            <h:outputText value="#{mptv.description}" title="#{mptv.description}"/>
                        </s:div>

             

                    </rich:column>

             

             

             

            I hope this helps.

             

            Lucian

            • 3. Re: extendedDataTable text wrap
              Tom Todaro Newbie

              Thanks, but it didn't work.

               

              The row has to be dynamically resized as with a regular data table, since the description text can vary in length. Unless I can get the same functionality, I can't use the extended table.