Vaadin 7 deprecated errors

Hi, when a I copy this exampe code from Vaadin 7 Book

main.addComponent(new Label(“Here we have an image <img src="” +
this.getRelativeLocation(labelimage) +
“"/> within text.”,
Label.ContentMode.XHTML));

It give 2 errors:

First: The method getRelativeLocation(ClassResource) is undefined for the type MyVaadinUI

and

ContentMode cannot be resolved or is not a field

I m using Maven Archetype Application 7.0.1. The class extend from UI, and the imports of com.vaadin.ui.

Thanks in advance!
12899.png

It actually said “this does not work at the moment”. Finding out the URL of a resource is currently not very easy. I’ll remove the section until there’s a proper alternative.

Thanks, so what I did was use a Embedded to show an image.