This page is a part of RichFaces 4.0 JSF 2.0 Integration
The RichFaces 4.0 AJAX capabilites should be based on the JSF 2.0 "behavior" and AJAX features to be compatible with other libraries.
- Make RichFaces AJAX compatible with JSF 2.0 specification requirements.
- Make RichFaces compatible with third-party libraries.
- Improve performance.
- Make AJAX library portlet-compatible.
- ?????? Integrate AJAX feature with Bean Binding (JSR-295) , to make AJAX updates automatically in case of model changes ????????????
Extended RichFaces AJAX features are:
- Design of RichFaces <a4j:queue/> ( TODO : Where is queue article ? - ADDED)
- Server based "process" and "update" sets.
- Better iteration components support ( UIData, trees and iterators ).
- Additional RichFaces features: listeners, error handlers, updatable messages etc.
- Browser history support
- Client-side events for AJAX updates (forum discussion)
Event Driven AJAX Updates.
The new JSF 2.0 behaviors could be interpreted as approach to the common event-driven GUI model. The Behavior instance seems as the EventListener bounded to the GUI event on both client and server sides. That hides and simplifies communication proces for application developers, but they still have to manually define parts of page that affected by model updates and should be refreshed on the client, same way as for old Ajax4jsf and RichFaces. But most of modern GUI libraries, like Java Swing or JavaFX have also backward communication channels there binded properties or models fires value change events that update user interface transparently. The idea for RichFaces 4.0 is to introduce such event model for JSF components, these events should mark parts of page 'dirty' and automatically include corresponding component into AJAX response. That can significantly simplify development of rich internet applications without performance costs.
Framework API should define a default ValueChangeListener object that collects events from models and component handlers ( append and delete cases ) and calculates Id's for partial rendering. User beans would fire sich events from code created by the developer or by the appropriate model classes similar to Swing models, from Jboss Seam interceptors, by bindings similar to the JavaFX or Bean Binding (JSR-295) . VDL handlers should fire similar events in the case of components tree changes ( thanks to the extensible VDL model, we can extend default functionality ).
To achieve these goals:
- Ajax library implementation discussion on our forum.
- Create custom <h:form> replacement wich writes only one base AJAX call per form while per-component calls should contain only behavior clientId and additional parameters if any.
- Use JSF 2.0 traversals and PartialContext instead of the custom UIViewRoot and ViewHandler.
- Transform Ajax4jsf "support" component into the JSF 2.0 "ClientBehavior" implementation.
- Make custom AjaxBehaviorRenderer that transform JSF 2.0 calls into RichFaces ones.
- Remove Ajax filter from the applications. The original Ajax filter was developed to support old Mozilla brousers which have not had "InnerHTML" property support in XHTML mode at all, therefore is only DOM manipulation was only avalible. The filter transforms any HTML response to the
- Rewrite 'a4j:log' and 'a4j:status' components.