myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject [TRINIDAD] 1.0.3: new PPR features
Date Wed, 22 Aug 2007 05:38:50 GMT
Just added:

- PPR should be a good bit more efficient, as most input + output
  components will not render anything unless they are being PPR'd,
  and tables, trees, treeTables, navigationPanes and trains
  will be entirely skipped unless they or one of their contents
  is being PPR'd.

  Until now, PPR rendered everything and a ResponseWriter trimmed
  out what shouldn't be rendered.  That's still the case in part, but
  we can now entirely skip some branches of the UIComponent hierarchy.
  (The client validation code had to be somewhat overhauled to make
  this possible.)

- A new "addDomReplaceListener()" method provides notification
  of DOM changes from PPR.  A trivial example is:

function notePpr(oldDom, newDom)
{
 console.log("old", oldDom);
 console.log("new", newDom);
}

TrPage.getInstance().addDomReplaceListener(notePpr);

  ... which logs to Firebug any DOM elements that have been
  added or removed.

 Feedback we need:  currently, this API is called *after*
 the DOM replacement has happened, and gives you no
 way of preventing or overriding the DOM replacement.  I'm
 far from convinced that's the right choice:  it might be better
 to run this before replacement and allow this  function to "return
 false;", in which case no replacement would happen.

Cheers,
Adam Winer

Mime
View raw message