On 8/3/07, Andrew Robinson <[EMAIL PROTECTED]> wrote:
> I've started a project on the side using JSF and am trying to decide
> on an AJAX component library. I'm debating between using A4J, which I
> have used before and Trinidad, which I have not. Here are the
> libraries that I have decided it must work with:
>
> MyFaces 1.1.5 (or 1.2.0)
> Tomahawk 1.1.6
> Facelets 1.1.11
> JBoss Seam 1.2.1
>
> Functionality I would like/require:
> * re-rendering of specific components
Yes.
> * submission, decoding, validating and updating of only select components
Not today, but on the table.
> * ability to run custom busy java script code to be run while AJAX
> request is being processed
Yes (in 1.0.2), including a skinnable statusIndicator component.
> * Clear API for writing custom components to leverage AJAX functionality
Easy.
> * Clear API for specifying re-rendered components in backing bean actions
Easy.
> * ability to run javascript after an AJAX call is complete that
> differs per-component
High priority for 1.0.3.
> * clear javascript hooks into the client side API for customizing the behavior
Would want more details to answer.
> * ability to skip the update phase to just check for
> validation/conversion errors (would be nice functionality)
Trinidad has probably the most extensive set of fully
client-side conversion/validation checking out there,
obviating the need to post back to the server.
> Would like to see these types of components:
> * SPAN/DIV AJAX "areas" to be able to re-render them to AJAX enable
> non-ajaxed components
Yep, but in fact non-ajaxed components can be re-rendered
without even relying on an area!
> * ability to specify which components to submit/decode/validate/update
> (tomahawk sandbox subForm can work if it resorts to that)
Not so much today. Trinidad does have a subform, though,
and I'm eager to get some custom lifecycle support at least into
the Trinidad 1.2 version to limit the scope of postbacks.
> * polling component
Yes.
> * ajax-enabled include that works with JSF navigation (would be nice)
Hrm, no. That would be cool.
> * ajax on event functionality (re-render such-and-such when a select
> box changes value for example)
Yes (autoSubmit + partialTriggers).
>
> Ajax4JSF has all this functionality and I like it but I have issues
> with it, and I want to see what the Trinidad team has to say.
>
> Problems I have with A4J:
> * LGPL license, so no hope of components written by the Apache team
> that will work with it
> * Very limited component library that supports it (RichFaces)
> * RichFaces lacks many components that are "standard"
> * RichFaces API is lacking as well as the quality (I find that if you
> use their controls slightly differently than they tested them you
> starting hitting all kinds of problems)
>
> From what I have seen so far with trinidad, I have not seen any of the
> ajax functionality really exposed. Are there any components equivalent
> to a4j:support, a4j:region, a4j:poll?
Trinidad has looots of AJAX functionality. partialTriggers to
automatically repaint components. Programmatic APIs
to request any component (even one not part of
Trinidad) to be repainted. a4j:poll == tr:poll. A variety
of components that use AJAX to redraw themselves (and
children) as needed, like table and showDetail.
To be precise, until Trinidad 1.0.2, we haven't had "true"
AJAX support - it's used an old IFRAME-based technique
built before XMLHttp even existed. 1.0.2 (to be released
in a matter of days, available in snapshots)
> How easy is it to write custom trinidad ajax components?
Pretty simple. All you need to initiate a Trinidad AJAX request
from JS is:
TrPage.getInstance().sendFormPost(form, {yourparams]);
(again, in 1.0.2)
-- Adam
> So really, I just want to hear how the trinidad functionality stacks
> up against A4J
>
> Thanks,
> Andrew
>