Vaadin Book example are not consistent?

Hello all,

I came across this problem.

Here,, it is shown how to write a modal window for user interaction.
Fair enough, it is Vaadin-7, as the url suggests.

The problem is, that in the example code, the
com.vaadin.ui.Window class has the method com.vaadin.ui.Window.addWindow(Window window)
The compiler does not think so, unfortunately. I am using Vaadin 7.0.1.

Looking at the API, from 7.0.0 onwards, this ominous method does not exist, whereas in Vaadin 6.8.9 it was alive.

So I think that the example(s) are somehow outdated.

What would be the “updated” example? Where can I find it?
Many thanks in advance for your help.


P.S: Why did the method had to die?


As stated in the beginning of some chapters, some of the content in the book still reflects Vaadin 6. There are hundreds of outdated passages and fixing them properly while trying to keep up with the new features is slow, so it takes time.

The layout components chapter is still to be updated, although it probably doesn’t have many outdated sections as the layout components haven’t changed much in Vaadin 7. Except for Window, Panel, and other single component containers…

Most of the code examples are already updated and are
, but not all of the updated examples are yet in the book.

Sub-windows are added to the current UI object in Vaadin 7 with [tt]


thanks for the clarification.
I think that this is not very professional, as Vaadin claims to be so good.

But there are alternatives.

Sorry to dissappoint you. We have chosen to have the book sometimes separate from the release cycle of the core framework, as it would otherwise make it necessary to postpone some Vaadin releases significantly. Vaadin 7 with its many major changes is one such occasion. Nevertheless, I hope to get the remaining parts updated soon, so Vaadin should be good again.

Actually, it looks that the sub-window section is the only remaining significantly outdated section in the Layouts chapter. Panel is already updated and there shouldn’t be any backward-incompatible changes to the other layout components. TabSheet and Accordion have some new features which are not yet mentioned.