Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How new Widget ?
Hello to all,
I am writing to ask for advice on an example of widget that I am creating.
My intention is to create a custom Image component with an attribute more than the normal html tag (altering the original html) and would like to pass a Fileresoure the src of the image (then encoded with the uri "internal" of Vaadin).
So I would expect to call the component as well:
MyImage im = new MyImage (new FileResource (new File ("physical path on the disk image"));
layout.addComponent (im);
that will be translated in html:
<Img src = "VirtualPathVaadin" newattribute= "value" />
Of this then I have to be able to call functions from a javascript that will import.
Thanks for any help and sorry for my english!