13 Jun Loading Animation on Visualforce
Maybe it’s just be but even if you build the most amazing system in the world, it won’t be awesome if it is not visually pleasing or beautiful UI. No font should not be uneven, or the images should not haywire. Everything should be in order. Perfect.
A simple script can save you a long email, informing you that a million dollar system is broken because it does nothing when users click the buttons. If you have a long processing happening in the background, its not good to assume your users are psych to know what’s happening in background (if only we could see data packets send one by one). If you do not show them that something is happening, they will end up clicking the button again and again, sending multiple request to the server. Worst case scenario your system will be returned back with a thank you note that excel sheet was better, this is broken.
I found a optimized and simple way of doing it.
The please wait image should be loaded in static resources with name ‘AjaxAnimation’. You can download some nice images I collected for my own projects.
This simple code will help you prevent that unpleasant email on a Monday morning that will spoil the whole day.
The best way to do it is make a custom component and keep it handy on all the pages, just add the component to the page. Working on a generic pagination component next, download and add and you have pagination for yourself.