myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <>
Subject Re: [Trinidad] how to know that PPR is ongoing
Date Wed, 23 Jan 2008 08:20:57 GMT
there is a statusIndicator comp., but that is not JS.

so here is a "monitoring ppr" JS:

     var requestQueue = TrPage.getInstance().getRequestQueue();

function myCallback(state)
  var busy = state == TrRequestQueue.STATE_BUSY;
  var div = document.getElementById("load"); = busy ? "inline" : "none";

a div like this could be in the page:
<div id="load" style="display: none; background-color: red;..."> LOADING...

we also have a DOM replace notification, after PPR


function myCallback(oldDom, newDom)
{ ...}

I think more on that is in the dev-guide.

On Jan 22, 2008 11:56 PM, Renzo Tomaselli <> wrote:
> Hi, assume to have a component which might be rendered either in a full
> page or in a PPR context.
> It needs to distinguish these alternatives since it might run some js
> chunck requiring full DOM completion.
> For example, on IE we are not allowed to modify the DOM before page
> completion, thus we must delay by means of onLoad handling.
> How do we know "officially" from js that we are in a PPR ?
> Suggestions are welcome.

Matthias Wessendorf

further stuff:
mail: matzew-at-apache-dot-org

View raw message