Hi,

I've been looking into different ways to partially refresh a JSF page (actually a Facelets page) to get more responsive components (datagrids, etc.), and have come up with a few options. Thought I'd see if anyone on this list had strong opinions on one versus the others. I'm willing to do client-side JS if necessary, but ideally the solution would be as simple as adding an attribute in a JSF-ish tag.

Here's what I've found:

1) ADF Faces. Jacob Hookom did a blog entry in September with the following code snippet from Oracle's ADF:

<af:commandButton action="#{bean.method}" partialSubmit="true"/>
<af:commandButton text="Refresh Some Things" partialSubmit="true" id="refresh"/>
<af:outputText value="#{oneValue}" partialTriggers="refresh"/>
<af:outputText value="#{anotherValue}" partialTriggers="refresh otherRefresh"/>

This is exactly what I'm looking for (assuming there are <af:datagrid, af:xxx> components for all the regular components), but I wasn't sure whether or not the donated Oracle components include this partial refresh capability. I've heard some components are only available in the commercial release ... is this one of them?

2) ajaxanywhere <http://ajaxanywhere.sourceforge.net/>. A pretty clean way to designate parts of the page to refresh. This project looks like an option, but it does seem like triggering the partial refresh requires you to call an ajaxanywhere-specific JS function--which is not a dealbreaker, but "less nice" than the ADF method. My sense is I could definitely make this work if the other two options aren't feasible yet.

3) JSF Avatar. Not much info out there about Avatar, but it seems to be a Sun-powered extension of JSF that allows you to designate a ProcessingContext, so that JSF can organically create just the components that're asked for by an AJAX request. This one is conceptually appealing, but it seems very nascent and I'm not sure how usable it is. (only available in a Glassfish container? I need something I can drop into Tomcat or Resin) I've read that the server-side piece is implemented somewhere at Sun, and I'd be willing to homebrew the client piece if necessary. Has anybody here actually used Avatar? Do the Blueprints examples use Avatar? (haven't looked yet)

I know about some others (ajax tags, some jhook plan on the horizon for a custom partial-page rendering engine), but these seem like the most practical options for a project migrating to JSF today.

Only other requirement is that it works in Facelets. I'm even willing to switch to RI (I know, I know- it's a MyFaces list) if that's required for Avatar.

Any thoughts would be much appreciated.  Thanks in advance-
Rogers

Reply via email to