How to apply wrap text style in JSF datatable?

Viewed 25036

I have a data table in my application, I fix the columns width as 200. If i print small line in datatable column means it prints correct format. If i print lengthy line in the datatable column means, it cant wrap it out. how can i wrap the text in data table column.

Problem Description enter image description here

3 Answers

My sollution is to apply word-break style to column. Just like:

                <p:column id="accountsMaskColumn"
                          headerText="#{msg['mr.settings.headers.accountMask']}"
                          filterBy="#{item.accountMask}"
                          sortBy="#{item.accountMask}"
                          style="word-break: break-word">
                    <h:outputText value="#{item.accountMask}"/>
                </p:column>

Hope someone find this useful

Related