[jboss-dev-forums] [Design of JBoss Portal] - JBOSS Portal, JSF, XHTML and AJAX !!!finally!!! :-)

dajevtic do-not-reply at jboss.com
Wed Sep 6 05:54:06 EDT 2006


Hello dear portal developers,
after having spent many nights with the source code, I have finally managed to ajaxize my portal, meaning that I can use JSF, XHTML and AJAX to rerender only the changed content of the portlet that triggered the post. I can even send complete forms via Ajax request, trigger the JSF lifecycle and rerender the changed data (e.g. adding items to a table).
Having finally done this (I know it was not rocket science) I am now a little concerned with the changes I have done to the portal source code (5 java files total). I changed the portal servlet to create a ServerRequest instance with a flag indicating if the request was an AJAX request (added public boolean isAjax() to the ServleRequest class and changed the constructor of this class). I also changed InvokeWindowRenderCommand and InvokeWindowActionCommand because the first lifecycle (action=2) applies and afterwards the second lifecycle occurs (action=1) in order to render the apges. In some other classes where rendering occurs RenderContext, etc. i check if it is an AJAX request and if so I set the Renderer to emptyRenderer and make sure that only the target portlets (specified in the XMLHttpRequest) are rerendered. Voila, no more flickering.

My question is, are there any plans for the (near) future to AJAXize JBoss Portal, rendering my hacks obsolete, and if so, which version is planned to have AJAX capabilities? 
Furthermore, Julien, in another post, you mentioned that it is possible to change the invoked Commands easily. Would that be a more prefferable approach, than changing the ServerRequest class?

Kind regards,
dj

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969674#3969674

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969674



More information about the jboss-dev-forums mailing list