If you just want to change the mouse cursor (with custom- or system-defined cursors), you could do this:
Define a JS function that changes the cursor based on boolean param:
<a4j:status id="myStatus" forceId="true" layout="block" onstart="waitCursor(true)" onstop="waitCursor(false)" />
Tell us how this works!
God bless you.
Oh, you are talking about every pure client-side JS action... I thought you where talking about AJAX related actions only...
Maybe you could call waitCursor(true) at the beginning of all your JS functions, and waitCursor(false) at the end...
Or you could register just once an event listener (with your preferred JS library) for the onclick event for the whole page, attaching a call to waitCursor(true) to it. But, you would still have to call waitCursor(false) to reset the cursor. I think there must be a direct way to define this sort of "oncomplete" event listener so as to call waitCursor(false), but surely it depends on your JS library. You should check your JS library docs for more details... and tell us what you find!
I want to show the loading status in mouse every componenet action.
How i trace, just once an event listener for the onclick event for the whole page, and complete the process.
If i trace the onclick event for whole page, then that time call waitCursor('true')
If i identify , complete the process in whole page(every action), then that time call waitCursor('false').
Is there possible?
you could use jquerry to get all links and buttons DOM elements and bind some handler to click event. For ajax components - a4j:status should still be a solution because you need to cancel the 'waiting status' oncomplete. But for common h:command's - there is no need in such canceling because full page refresh occurs and status will be changed to defaut anyway.
Thanks Ilya Shaikovsky,
Still i am not aware of jQuery.
Give me url to study the jquery and
where i find the jquery for this post (jQuery to get all links and buttons DOM elements and bind some handler to click event)