On 03/24/2010 01:45 AM, mariyan nenchev wrote: > Hi, > > I have gwt app that uses many images for its customization. I use > sprites for most of the images, but there are about 10 images that are > not in sprite. So if the connection with the server is slow theese > images are loaded with little delay and my app is not rendered as it > should be. Is it possible to block all user interactions until every > thing is loaded? > > Regards. > > -- > You received this message because you are subscribed to the Google > Groups "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en.
Hi Mariyan, Much depends on how you manage your document during the initial load phase. Do you have a "Loading, please wait..." panel? If not, it's probably something that you'll want to implement. If you are loading the images via XHR, consider doing that inside an IncrementalCommand. The IncrementalCommand reads from a queue of URLs to load. Return true while loading, return false when complete; which return tears down the "Loading..." panel. You might also play around with loading the images via your base HTML into one or more divs with the style "display: none". The browser load will not be complete until all images are at the client. As above, tear down the "Loading..." panel in your onModuleLoad() method. If none of these ideas are helpful, we'll need more info. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
