Problem in a table while wrapping the text within a cell

Hi there,

what i want is very simple:

A table with 1 column, which contains a Label which displays a long description. Thats why the Label should wrap the text within the cell.

My approach:

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

and

  @Override
    public void init() {

        // Theme:
        setTheme("ffl-theme77");

        // Table:
        Table table = new Table(null);
        table.setHeight("300px");
        table.setWidth("100%");
        table.addGeneratedColumn("row", new ColumnGenerator() {
            @Override
            public Object generateCell(Table source, Object itemId, Object columnId) {
                return new Label(itemId
                        + " This is a long descrption. This is a long descrption This is a long descrption This is a long descrptionThis is a long descrption This is a long descrption This is a long descrptionThis is a long descrption This is a long descrption This is a long descrptionThis is a long descrption This is a long descrption");
            }
        });
        table.setPageLength(50);

        // Datas:
        IndexedContainer tableDataSource = new IndexedContainer();
        table.setContainerDataSource(tableDataSource);
        for (int i = 1; i < 1000; i++) {
            tableDataSource.addItem(i);
        }

        // Window:
        Window mainWindow = new Window("Test Application");
        mainWindow.addComponent(table);
        setMainWindow(mainWindow);
    }

My problem:
When i use the style in order to wrap the text within the cell, the table shows just 50 rows and not more. 50 is set as pageLength. All other rows are missing.

If i don’t use the style, all 1000 rows are displayed well, but just in a single row, means without wrapping the long description text.

What can i do in order to solve this issue?

I suggest you first to set column width of your table:

table_1.addContainerProperty(“object”, TextArea.class,null);
table_1.setColumnWidth(“object”, 300); //300 pixel

After create a new textarea object like this:

TextArea object=new TextArea();
object.setWidth(“300px”); // it’s the same width of table
object.setWordwrap(true);
object.setValue(“very long description”); //set first the value
object.setReadOnly(true); //then set the read only properties

Set the textarea’s object to table datacontainer

Item item = tableContainer.addItem(new Integer(1)); //example for row’s id
item.getItemProperty(“object”).setValue(object);