I think it is there since the old adf faces days. Perhaps we want to change that but I think that is low priority

Sent from my iPod.

Am 24.03.2008 um 20:27 schrieb Max Starets <[EMAIL PROTECTED]>:

Hey Andrew,

I did not know it was documented in devguide... Thanks for pointing it out.

It lives in trinidad-impl, so I assumed it was not part of public API.
In ADF Faces, we put all public JS functions/classes in the API jar.
I can see that all Trinidad javascript lives in the IMPL jar. Do you know if it was intentional? I am copying Matthias too since he may comment on that.

Thanks,
Max

Andrew Robinson wrote:
Max, it is part of the public API. It is clearly documented in the
developer documentation:

http://myfaces.apache.org/trinidad/devguide/ppr.html


On Mon, Mar 24, 2008 at 12:06 PM, Max Starets <[EMAIL PROTECTED]> wrote:

Richard,

I guess you want your Javascript to be notified when a PPR request is being
sent, right?
There is a way to do it, but the supporting code is not part of the public
API:

TrPage.getInstance().getRequestQueue().addStateChangeListener (instance,
callback);

Here "instance" is an instance of the object used to invoke the listener
(it may be null if your listener is global),
"callback" is the actual listener function.

A single parameter (state) will be passed into your callback:
state == TrRequestQueue.STATE_BUSY would indicate that PPR request is about
to be sent
state == TrRequestQueue.STATE_READY would indicate that PPR request has
just returned.

As I said before, this code is not part of Trinidad public API, so there
are no guarantees that it will continue
working in the future. If it is something that you think is generally
useful for developers using Trinidad, you can raise
a JIRA issue for that.

Regards,
Max Starets





Richard Yee wrote:

Scott,
The poll component will not work because I don't want to invoke a PPR b/c it will refresh the session. What I need is a hook into the Trinidad JavaScript API like an "onPPR()" method that I can override to be notified when a PPR request is made. The purpose of the dialog is to tell the user if they are still in front of the screen that their session is about to expire and give
them the opportunity to refresh the session rather than have them do
something with the UI and then get redirected to a page that tells them that
their session timed out.

Thanks,

-Richard



On 3/24/08, Scott O'Bryan <[EMAIL PROTECTED]> wrote:

Will the "poll" component in Trinidad do what your asking?



On Fri, Mar 21, 2008 at 10:21 PM, Richard Yee <[EMAIL PROTECTED] >

wrote:

Hi,
I am currently using a servlet filter to handle session timeouts to

redirect the request to a session expired page. This is working okay except for if the user clicks on the chooseDate calendar icon after the session times out. With ENABLE_LIGHTWEIGHT_DIALOGS="false" (due to the month name problem in IE6 (Trinidad-941)), the session expired page appears in the calendar window instead of the main window. Once approach to handling this case as well as providing the user a warning before the session is going to timeout is to display a dialog to the user prior to the session timeout that says something like, "Your session is about to timeout" with a Continue button. After a minute or two, the dialog would automatically be cleared and an AJAX call would be made to the server to force the session expiration. To do this, I would have to have a JavaScript timer that would be started when the page is loaded, reset whenever a PPR call is made, and cleared whenever the page is unloaded. Has anyone implemented this with Trinidad? Is there a way to get notified via a callback or hook method when a PPR request is made by the Trinidad JavaScript API? Correctime if I'm wrong, but I don't think I
can use the Trinidad dialog framework for this because it must be
implemented for every page in the application.

Thanks,

Richard






Reply via email to