Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!