Adjusted code for Vaadin7.