One of the best ways I know of to tell a user that they should be waiting for something to finish, is by setting the cursor to ‘wait’. It’s how desktop applications do it. It’s how the operating system does it… it’s how ajax should probably do it (if you want to solve the user wait interaction globally.) JSF2 makes this EASY.
Of course, you could take whatever action you like for your indicator -- you don't have to use the cursor. This entry lays down the framework for building a custom indicator.
Read the full article.