Total Pageviews

Thursday, February 07, 2013

Multi Line Table Cells in Vaadin 6

I had a hard time figuring out how to wrap content in a table cell using Vaadin 6.7.
Content in row headers can be forced to wrap using a simple "<br/>" tag in the string. Unfortunately it isn't that simple with non-header cells.
I found a working solution in this Vaadin forum post.
You simply have to create your own CSS stylesheet definition and add the following code to it:

 .v-table-cell-wrapper {   
  white-space: normal;   
 }  

2 comments:

  1. For scrolling tables, this solution will cause issues. Variable height rows are only supported by Vaadin if pageLength is 0.

    ReplyDelete
  2. Flexi Solutions offer a range of customised height adjustable desks for use in the workplace, education and the healthcare industry.
    more information then visit: http://www.flexi-solutions.com.au

    electric height adjustable desk

    ReplyDelete