Table setSizeFull() broken with Vaadin CDI

Basically, we had a Vaadin UI for our system and it worked fine, just as expected. Recently, we migrated the backend to a CDI structure, and started refactoring the UI. For the last couple of days, I’ve been stuck with a problem related to the Table UI component and its containerDataSource.

What happens is: when i enter a CDIView with a table, its data is not shown. The headers will be there, action handlers, etc… However, the data won’t be shown. After debugging, i found out that the data has actually been loaded, and is present in the table’s container.

So, I tried to load the data in many different ways, thinking that the problem was in the container. However, after many failed attempts to have the data show up in the table, I decided to comment every single line of the code related to the table, trying to find if any of the lines was responsible for it. That’s when i found out that if i commented ONLY the table.setSizeFull() line, the data would show up in the table.

I really have no clue why this happens, has this happened to anyone before? I will update this post later today with a code example and some screenshots, but it will have to wait a little bit.

Vaadin version: 7.3.8
Vaadin CDI: 1.0.2

Your problem doesn’t really sound like it has anything to do with CDI, but who knows. It sounds more like a layout problem. Maybe your view or some other layout has undefined size, which causes a layouting conflict when the Table has full size (you can’t usually have a relatively sized component inside a layout with undefined size). You can try the Analyze Layouts in the ?debug window to detect such problems (when you are experiencing the problem).

Yes, it definitely doesn’t sound like a CDI problem at all… The weird thing is, it only happened after importing the CDI add-on and declaring the view as a @CDIView and the controller that loaded the data as a @NormalViewScoped. Not a single other line besides those and the necessary @Inject were changed in the view class.

this only happens when the table’s size is set as “100%” for width and/or height… i don’t know if it has anything to do with the way that CDI creates proxies and somehow affects the table… i really have no clue why this is happening :confused:

Well, it really seems to be a layout issue now… my co-worker found out that the data is actually there, but the table has a height of 0px after setting sizefull…

fixed… someone migrated the Navigator logic from class A to B and forgot to add the setSizeFull on the view container in the new class… omfg, lost almost 2 days due to a stupid error that nobody thought could be the case >_>

thanks for the insight lol

In cases like this, the ?debug window’s analyze layouts tool is your friend.