BeanItemContainer backed Table with generated column

Hi,

I have a simple Table component which displays trivial/simple pojos wrapped in a beanitemcontainer. Table has a generated column too, which contains “delete row” button. In addition there is a button alongside the table which simply adds random/generated pojo to a beanitemcontainer (.addBean(pojo)). And here is the problem:

a) when table is initialized with at least one pojo/item, pressing button adds a row to the table fine, including generated column with “delete row” button in it;

b) in case table is initialized with empty beanitemcontainer, button click (which works in (a)) does not add row to the table - there is no error, only visible result is that table headers are lost and nothing else happens.

BTW - when that generated column is not added to the table at all, table updates are fine in both cases (a and b).

Anyone seen similar problem ? Can’t spot immediate problem with my code.

/mareks

Hmm… When run in a debug mode, debugger console shows that despite table is not showing any rows, they are visible (as being added) in debug console. Debugger is spitting out following error:

JavaScriptException: (TypeError): Cannot read property ‘y’ of null

Any clues ?

/mareks

Found it. I were setting setColumnWidth() on a generated column. When that call is removed, table is updated fine.

/mareks