Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Primefaces show animation when button clicked

Tags:

primefaces

I have the following button and panel in primefaces:

<p:commandButton value="Submit"
    ajax="true" actionListener="#{myBean.search}" update="resultPanel" oncomplete="panelwv.show();">
</p:commandButton>

<p:panel widgetVar="panelwv" visible="false" closable="true"
    toggleable="true" id="resultPanel">

I want while the myBean.search executes, an animation appears on the screen. Any help? Thanks!!

like image 400
loubas Avatar asked Oct 30 '12 13:10

loubas


1 Answers

You can use the Primefaces AJAX - Status - Declarative

Ajax Status is a global indicator to inform users about the ajax interactions. By default ajax requests trigger the ajaxStatus component, setting global to false disables this behavior.

also take a look at the other examples Primefaces AJAX - Status

Just place some nice image in the h:graphicImage

You can generate one using the Ajaxload - Ajax loading gif generator

like image 117
Daniel Avatar answered Oct 13 '22 11:10

Daniel