Ajax in Java Pure Faces using RichFaces

by Matt Pickell for JavaPureFaces, ajax, richfaces

We have been busy transitioning Java Pure Faces to begin using Ajax! This included integrating RichFaces into the framework, and with that there were many details that we needed to work out.  But… Ajax is here!

One major issue we needed to overcome was that with RichFaces does not support dynamically replacing components in the JSF tree, only updating.  Of course it is possible but requires a lot of dynamic component building in the backing bean or it can be simulated with the use of the ‘render’ flag and multiple existing components.  We found a way through actionListeners to solve this issue.   JPF is still required to maintain a ‘placeholder’ on the page where a component will be created, but the contents of that container are totally dynamic.

So far we have a small subset of components transitioned to Ajax and we have set a goal to have an open source version of the framework out this year. There is still work to do on it, and more components to implement, and (always!) some cleanup!

For now, let us know what you think of this first demo! It is small, but begins to show how nice the Ajax usage can be!

PureStock Ajax Demo

Leave a Reply