A more elegant approach that avoids the need to submit and re-render the entire page is to do an AJAX request. That can be done in a number of ways, including:
3. Using the JSF2 AJAX support features
4. Using third-party JSF AJAX support packages such as RichFaces or IceFaces.
An IDE is no substitute for an Intelligent Developer.