Vaadin CDI @NormalViewScope problems


We have a little @CDIView with a Tree and a TabSheet, in this tabsheet the left click on tree can open new Tabs with Grid.

If each component is @Dependent, it’s working fine. But for obvious reason I wish to use @NormalViewScope.

Two probems :

  • When the View is leaved, the detach() of CDIView call detach on all components, but somewhere in code the getUI() return null → NPE
  • If all comp are @NormalViewScope, when I click on tree, the tab appear but not the grid. Bu looking in chrome console, it complains there is an hierarchical problem like “comp id 49 is declared as child of comp47 but comp 49 is unknown”.

This is really annoying.

Is anybody can help ?

Thanks and regards.

Can you show some code? I’ve been playing around with Vaadin CDI in order to understand it better, this could be beneficial for both of us.

Not-working code would be easier than trying to recreate your situation myself, it will also increase the likelyhood of me helping you.

I have to reproduce at home tonight.

If I push code from here, I will be fired.