Comments on: Apache My Faces Trinidad: dynamically refreshing Non Trinidad components in a Partial Page Refresh ("AJAX") Friends of Oracle and Java Sat, 25 Apr 2015 11:36:47 +0000 hourly 1 By: Adam Winer Sun, 12 Aug 2007 22:27:27 +0000 I’m seeing this a couple months after it was published, but the primary benefits of switching to XMLHttpRequest from iframes are:

1. Better error handling (IFrames do a very poor job of letting you know when a request fails)
2. Far better (and simpler) handling of Javascript embedded in PPR requests
3. Finally, a public API for submitting PPR requests
4. A statusIndicator component for showing busy state
5. Much better opportunities for JS plug points (the statusIndicator uses one of these)
6. Simpler (and therefore more robust) code overall
7. Proper queueing of requests (instead of a fairly ad-hoc solution before)

It probably is a bit lighterweight, but that wasn’t the main goal, and I haven’t attempted to measure this. In fact, we do actually still use iframes when PPR needs to include a file upload (XMLHttp does not support file upload payloads), but it switches transparently.

All this is available in Trinidad 1.0.2, which will be released shortly, but has been available as nightly bulds for awhile.

I’ve also finally gotten off my rear and written documentation for Trinidad PPR: see

By: Lucas Jellema Mon, 18 Jun 2007 13:38:24 +0000 Seb, You are right and an XmlHttpRequest Object based implementation can hopefully be made leaner and little bit more intelligent as to what to render to the browser in a PPR request – not the whole page but just the updated component (‘s attribute values) ideally. Lucas

By: sebnoumea Mon, 18 Jun 2007 12:18:29 +0000 Hi,

Indeed, interesting things to know about PPR becoming XmlHttpRequest…

Ric, is there any plan for integrating XmlHttpRequest in ADF Faces before the release of the rich components that come with JDeveloper 11g ?

Lucas, one thing I think is really different is the fact that AJAX with XmlHttpRequest can be true asynchronous. It seems that the current implementation of PPR in ADF Faces leads to some weird behaviors … Am I wrong ?
Apart this detail, I agree with you, I am happy the way PPR works right now.


By: Lucas Jellema Sun, 17 Jun 2007 19:17:13 +0000 Ric,

Thanks for your reaction. Interesting to see that development., When will it be available in the regular Trinidad builds?

One remark though: why do you only consider frameworks using the XmlHtppRequest Object to be “true AJAX’? As far as I am concerned what matters most is the effect we achieve: interactive, responsive, appealing, productive applications. And Asynchronous communication between client and server is an important means to that end. And the XmlHtppRequest object is just one way to achieve that asynchronous background communication, just as the IFRAME is a mechanism. I have never considered PPR in either ADF Faces (or UIX) or Trinidad to be inferior to other AJAX solutions because of the fact that it does not use the XmlHttpRequest object.

If this new implementation is more light weight (faster, less network or server load) or easier to use (don’t think that will be the case though) I am happy. If it is the same with a different underlying implementation, I am not so much thrilled. I have never really understood the “true or proper AJAX” discussion.

By: Ric Smith Sun, 17 Jun 2007 17:47:48 +0000 Lucas,

The architecture you describe is no longer invalid with the next release of Trinidad. Adam Winer just put the final changes intro Trinidad that removes the iFrame dependency from all components except for file upload. Trinidad now relies on the XmlHttpRequest object. Thus, Trinidad is now a true Ajax framework.

Ric Smith
Principal Product Manager
Oracle JDeveloper & ADF