It also prevents the user from sending multiple AJAX requests.
The poll results and the real-time trading data are dynamic elements that are unknown until run time, but elements that should be added or updated when the server side sends a signal. A previous developer Works article, "Craft Ajax applications using JSF with CSS and Java Script, Part 2: Dynamic JSF forms" explains how to hide and display optional JSF components without refreshing a Web page.
However, you can't use the method described in that article to solve this problem.
Within this article, I'll describe the following solutions: To better explain my solution, I'll work with a single example throughout the entire article.
The application is a Web site for online book sales.
Boots Faces processes AJAX fairly efficient, so it's unlikely Boots Faces is the bottleneck to your projects.
When JSF validation has failed for a particular form submit and you happen to need to update the values of invalidated input fields later by a different ajax action or even a different ajax form (e.g.
Sometimes, you might need to automatically update a Web page with dynamic elements.
For example, you would want a poll Web site to update the poll results as soon as its database receives new votes, or you might need a stock Web site that periodically updates real-time trading data of securities.
If you're using My Faces and if you've configured your application to be in the development stage, you'll see a non-descript Java Script error message. To solve the problem, register an is an interesting alternative.