I am trying to understand PrimeFaces’ AjaxStatus indicator.
There are two facets – start and complete.
Can anybody tell me, what really determines start and complete.
I am just trying to make the indicator GIF image visible when user clicks a button and make it disappear when he click another button.
If whatever I am trying to achieve does not make any sense, an explanation would be really helpful.
Thanks.
ajaxStatus component works with globally set components. This means that a commandButton with the attribute:
will trigger a process that will make use of ajaxStatus component (will update it’s output).
This said, ajaxStatus
startfacet will work when the listener method is called and will update when thecompletestatus is reached, this is, when the lifecycle of the call ends.As I understand, this will not take care of the success or failure of the process. For this statuses, you also have other facets available:
errorandsuccess.There is an ajax loading gif bundled with PrimeFaces: