What about the JSF-Extensions project? Isn't the Avatar solution there
closer to what will be in the future spec? If so, I think it might be
better to start with that. Does anyone know if it is production ready,
though? That would be my only concern...

Frank Russo
Senior Developer
FX Alliance, LLC


-----Original Message-----
From: Aleksei Valikov [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 12, 2006 11:21 AM
To: MyFaces Discussion
Subject: Re: AJAX for JSF

Hi.

> AJAX and JSF can definitely work together, but it's tricky because 
> AJAX can't be added incrementally; it has to be built into the JSF 
> components themselves.

ajax4jsf is capable of adding AJAX functionality to the existing JSF
components. 
That's the incremental addition you talk about.

> You might also want to some commercial JSF frameworks that support
AJAX. 
>  I've looked at ICEfaces a little and it seemed like it was on the 
> right track.  There may be something along those lines in Oracle ADF 
> at some point as well.  And the status of the open-source ones seem to

> change monthly if not weekly.

ICEFaces has a pretty nice idea that, I think, can be adapted. They hav
so-called direct-to-DOM render kit. That is, components are rendered not
as plain text but as a DOM tree. This allows easily identify subtrees
that have to be synchronized with the client. What client sees in his
browser is just a replication of the server-side DOM tree, synchronized
via AJAX.

ajax4jsf uses a different approach. When you use AJAX controls from
ajax4jsf or ajaxify existing controls with their a4j:support, you
provide (1) hook onto client-side event that triggers AJAX
synchronization and (2) (possibly via value
binding) a ids of the components which have to be rerender. Server-side
AJAX handler then renders selected components and sends the result back
to the browser.

The only problem with existing controls is that they need to be rendered
as valid XML in order to be transferrable and parseable on the client
side. 
ICEFaces solves this problem with own render kit (if you render DOM,
it's already valid XML after all), ajax4jsf uses JTidy filter to clean
up possibly malformed XML produced by components and their renderers.

By the way, requiring HTML but not XHTML was in my point of view an
awful decision. Otherwise all the JSF component were ajaxifiable out of
the box.

Bye.
/lexi


Reply via email to