|
|
|
07/03/2008
The Nuxeo application extensively uses JSF facelets and Seam for its rendering:
Even though last versions of Seam offer a very clean integration with Richfaces/ajax4jsf JSF libraries, the Google Web Toolkit (http://code.google.com/webtoolkit/) looks like a good alternative when dealing with the more complex screens. For instance, rendering a table of documents with pagination, sorting and selection support is not straight-forward with JSF facelets. While JSF goal to separate logic and rendering can be seen as too restrictive for a framework like Nuxeo EP, GWT makes it possible to keep this separation and not lose any expressivity because a GWT application is written in Java. Also, JSF has a quite steeper learning curve than GWT. Integrating GWT with Nuxeo EP is an attempt to get the best of both worlds: keep JSF for its integration with Seam, third-party JSF libraries, easy deployment/override of xhtml pages as well as existing Nuxeo modules relying on it, and use GWT for some specific complex screens. An addon has been written as a proof-of-concept. Documents are retrieved from the Nuxeo application via a Seam component and information for their rendering is serialized on the GWT client side to display them in a paginated table. Seam made life easier by providing a remoting service interacting with the GWT service framework: from GWT rendering classes, it's possible to call a standard Seam component that will implement server logic.Some code has been added to restore the conversation when calling the Seam component, as we want to display the list of current folder children. The conversation id is retrieved on client side thanks to javascript code parsing the url. It is passed alongside when calling the remote service. Packaging was not a problem thanks to maven plugins that perform the GWT compilation and make it possible to include them in the nuxeo.war folder at deployment. Integrating the GWT module within standard xhtml pages was easy: the javascript simply needs to be included in the page as mere html code.
Here's a screenshot of rendered table:
What's next?
For better understanding of these technologies, I strongly recommend the excellent article written by Rob Jellinghaus (Seam / JSF / GWT Integration: What, Why, and How: http://unrealities.com/seamgwt/article_0.2.html). The addon code is at http://hg.nuxeo.org/addons/nuxeo-platform-gwt/. It currently only works with the Nuxeo Seam 2 branch that should be merged in the 5.2 branch shortly.
Last modified:
05/10/2005 04:17 AM
|
Nuxeo Bloggers: Log in! Search Nuxeo Blogs
About this blog
Anahide Tchertchian
About this blog
Archives
Categories
Nuxeo Bloggers
Photos and Pictures
|
|
Nuxeo -
Indesko -
Nuxeo 5 Project
All content is copyrighted by their author. CPSSkins is Copyright © 2003-2006 by Jean-Marc Orliaguet. | CPS is Copyright © 2002-2006 by Nuxeo SAS. |