Embedded and using generated HTML code and generated images in this code.

I use Embedded element to view generated HTML content (trought StreamResource), this content contains tags. Problem is that this images are not visible in resulting Vaadin interface ( I see “no image error in browser”)
Question is - how to add inner image resources to the Embedded element that shows HTML pages?

Hi,

Could it be a problem with the image urls (if you’re using relative urls, for instance)?
(To figure this out, you could use Firebug to see if there are red rows in the Net->Images section, and check what address it’s using.)

Best Regards,
Marc

Thanks a lot!!! :lol:
Your tip was very helpful for debugging issue.
Workaround is not to use relative location of image source, for example:

<img src=ImagesServlet?message=TestMessage/>

instead, to use absolute location of image source:

<img src="+Application.getURL()+"ImagesServlet?message=TestMessage/>

In first case, as result we will have in browser:

APP/1/ImagesServlet?message=message1

and every refresh of Embedded source will produce new Resource instances:

APP/2/ImagesServlet?message=message1
APP/3/ImagesServlet?message=message1
APP/4/ImagesServlet?message=message1

In the second case, we will always have:

ImagesServlet?message=message1

I don’t know mechanism of generating inner embedded resources ( in my case - in generate “APP/x/” resource), but I hope my workaround can help somebody.
Thanks!