4 Replies Latest reply on Mar 22, 2013 10:46 AM by Jonathan Fuerth

    Errai-UI templates fetch all their images

    Michael Hirsch Newbie

      We chose Errai-UI in part because it is nice to be able to have designers and coders use the same files for the UI template.  No translation is necessary.

       

      So we have lots of HTML files that look nice it a web browser.  Many of these files refer to images so they look good when you put the template into the browser, but for our deployed application we use an image bundle, or fetch them from the DB, or anything but pull them from the war, so that we benefit from all the GWT goodness. 

       

      But when I watch the network traffic for our app, I see that when the templated class loads, the web browser tries to fetch any referenced files, including these images.  I had thought that since the template is only a template, image files like that would not be loaded.

       

      So I guess my question is what really happens when a @Templated java class is instantiated?  Is the template read and fully parsed by the browser?  That is what I think I'm seeing happen.  In any case, is there a way to keep the images that are only there for the template to look nice in a browser from being loaded by the browser?

       

      Note that the loads never succeed because they aren't in our war, but trying to find them and getting the 404 from the server adds latency to load.  And, if anyone checks out what the browser is doing, they will see lots of 404s and beconfused or suspiscious. 

       

      Thanks,

       

      Michael