Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Table Data is not showing when added in Custom layout...

Khurram Shakir
1 decade ago May 17, 2010 1:34pm
Jouni Koivuviita
1 decade ago May 17, 2010 5:03pm


You need to specify the containing table's and its TR and TD elements a height also (currently undefined). Use either percentage values or fixed pixels, however you get it working the way you want to.

This is because Vaadin components, when set to relative size, do not "push" the containing element. They expect the containing element to have a specified size (DOM getOffsetWidth/Height will return other than zero) for percentage sizes to work.

Khurram Shakir
1 decade ago May 18, 2010 1:11pm
Jouni Koivuviita
1 decade ago May 18, 2010 8:40pm

Khurram Shakir: but Still one small problem, when I used custom layout , it show a small margin 1 pixel on all corners , if I removed it and use vertical layout , the Table is added with out any margin space, in layout html I explicitly check there is no margin as such.

That's probably the TABLE element's cellspacing/cellpadding playing tricks there. Just add cellpadding="0" and cellspacing="0" to your TABLE element.