Java Reference
In-Depth Information
Combining the scheduler into our application
Up to now we have not included into our application the scheduler, which was in
charge simulating other customers requesting tickets. That was not an oversight; as
a matter of fact, introducing an external system in a web application poses some
challenges. For example, what if the scheduler updates some data used by the ap-
plication? How will the user know it?
There are several strategies to address this requirement; however, they all boil down
to use some intelligence in your client application. For example, if you are familiar
with web scripting languages, you can use the popular jQuery API to poll the server
for some updates.
Since not all Java EE developers might be skilled with jQuery, we would rather show
a simple and effective way to fulfill our requirement using RichFaces libraries ( ht-
tp://www.jboss.org/richfaces ) , which provide advanced Ajax support along with a rich
set of ready-to-use components.
Installing RichFaces
Installing RichFaces requires a set of core libraries that are generally available from
the RichFaces download page.
Additionally, you need to provide a set of third-party dependencies that are used by
the RichFaces API. Never mind, that's what Maven is for! Start by adding the latest
BOM for RichFaces API in the upper dependency management section:
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>4.2.0.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Then, it's just a matter of adding the rich UI libraries and the core API:
Search WWH ::




Custom Search