• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Show image (GIF) when a JSF page is loading?

 
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to show a loading image in my pages using these functions:



But the image does not appear, the pages are loading properly without displaying the image, does anyone know what was going wrong, or if there are other ways to do it?

Not appear any error on the console, I put it in my main loading JS, a single JS centered where I put all my functions.

There are other ways to do this run in an efficient manner?

I add the following "libraries" also:




I add this in a template page, "header", all pages of my application are using:




That is to say, I wanted to do this in a general way, in a way that all the pages of my application to inherit this function "wait", thereby displaying the image.

Here an example, thats exactly what I want to do, I want to do the same thing in JSF:

http://stackoverflow.com/questions/3535020/show-image-while-page-is-loading
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I finished using some richfaces components, I created a new "commandButton.xhtml":



Then, I put this code in my page "template.xhtml", every page in my application use this template:



Thus, I import this in my pages:



And use it in this way:




Finally, it worked fine for me, I believe it´s a better option instead a use of JavaScript, because using JavaScript was causing some crashes im my pages
 
please buy my thing and then I'll have more money:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic