You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by olip <ol...@googlemail.com> on 2009/03/10 16:54:01 UTC
T5: Tabset and expired Sessions
Hi everyone,
Is there a way to deal with expired sessions when you click on a tab from
the component Tabset and it has already expired?
It throws me some Rendering phase errors because all of the server-side data
is lost.
I am using the new tabset class from chenillekit.
I tried the tips from this forum to redirect to the login page in your
dispatcher but the dispatch() is not called/or called after the exception
was thrown (think this is ajax related).
Thank you for your help
Oliver
--
View this message in context: http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2456002.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Tabset and expired Sessions
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 11 Mar 2009 08:04:48 -0300, ravizzzzz <ra...@gmail.com>
escreveu:
> I am having same issues. I am not very sure about the disptacher you are
> talking about. But in my case h jspx pages using <tr:panelTabbed> does
> nottime out in UI and log out but throws an exception in console as
> below:-
> [3/4/09 16:19:01:125 IST] 00000035 StateManagerI E
> org.apache.myfaces.trinidadinternal.application.StateManagerImpl
> restoreView
> Could not find saved view state for token -1909e0a
Are you sure we're talking about the same framework here? I guess this is
the Tapestry mailing list, not the JSF one . . . hehehe :)
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Tabset and expired Sessions
Posted by olip <ol...@googlemail.com>.
Hi Peter,
Thanks for the tip, do you have an working example for this?
Where would I check the request.isXHR, in the Dispatchers dispatch I quess ?
Peter Stavrinides wrote:
>
> I remember having a similar issue with some AJAX components, I have not
> tried this particular one you refer to, so this is just a guess, but
> sounds like you need to check for request.isXHR to determine if the
> request is an AJAX request in your page, then handle the error (mostly a
> simple reload of the page is enough).
>
> Cheers,
> Peter
>
> ----- Original Message -----
> From: "ravizzzzz" <ra...@gmail.com>
> To: users@tapestry.apache.org
> Sent: Wednesday, 11 March, 2009 13:04:48 GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: T5: Tabset and expired Sessions
>
>
> Hello Olip,
>
> I am having same issues. I am not very sure about the disptacher you are
> talking about. But in my case h jspx pages using <tr:panelTabbed> does not
> time out in UI and log out but throws an exception in console as below:-
>
> [3/4/09 16:19:01:125 IST] 00000035 StateManagerI E
> org.apache.myfaces.trinidadinternal.application.StateManagerImpl
> restoreView
> Could not find saved view state for token -1909e0a
>
> i have used Filter class to validate session which works fine if i click
> on
> any otehr links apart from clicking on table or tabs in jspx pages.
>
> Did you happen to get a solution for this issue? if so can you please
> share
> it with me?
>
>
> olip wrote:
>>
>> Hi everyone,
>>
>> Is there a way to deal with expired sessions when you click on a tab from
>> the component Tabset and it has already expired?
>> It throws me some Rendering phase errors because all of the server-side
>> data is lost.
>> I am using the new tabset class from chenillekit.
>>
>> I tried the tips from this forum to redirect to the login page in your
>> dispatcher but the dispatch() is not called/or called after the exception
>> was thrown (think this is ajax related).
>> Thank you for your help
>> Oliver
>>
>
> --
> View this message in context:
> http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2460754.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2460941.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Tabset and expired Sessions
Posted by Peter Stavrinides <P....@albourne.com>.
I remember having a similar issue with some AJAX components, I have not tried this particular one you refer to, so this is just a guess, but sounds like you need to check for request.isXHR to determine if the request is an AJAX request in your page, then handle the error (mostly a simple reload of the page is enough).
Cheers,
Peter
----- Original Message -----
From: "ravizzzzz" <ra...@gmail.com>
To: users@tapestry.apache.org
Sent: Wednesday, 11 March, 2009 13:04:48 GMT +02:00 Athens, Beirut, Bucharest, Istanbul
Subject: Re: T5: Tabset and expired Sessions
Hello Olip,
I am having same issues. I am not very sure about the disptacher you are
talking about. But in my case h jspx pages using <tr:panelTabbed> does not
time out in UI and log out but throws an exception in console as below:-
[3/4/09 16:19:01:125 IST] 00000035 StateManagerI E
org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView
Could not find saved view state for token -1909e0a
i have used Filter class to validate session which works fine if i click on
any otehr links apart from clicking on table or tabs in jspx pages.
Did you happen to get a solution for this issue? if so can you please share
it with me?
olip wrote:
>
> Hi everyone,
>
> Is there a way to deal with expired sessions when you click on a tab from
> the component Tabset and it has already expired?
> It throws me some Rendering phase errors because all of the server-side
> data is lost.
> I am using the new tabset class from chenillekit.
>
> I tried the tips from this forum to redirect to the login page in your
> dispatcher but the dispatch() is not called/or called after the exception
> was thrown (think this is ajax related).
> Thank you for your help
> Oliver
>
--
View this message in context: http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2460754.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Tabset and expired Sessions
Posted by ravizzzzz <ra...@gmail.com>.
Hello Olip,
I am having same issues. I am not very sure about the disptacher you are
talking about. But in my case h jspx pages using <tr:panelTabbed> does not
time out in UI and log out but throws an exception in console as below:-
[3/4/09 16:19:01:125 IST] 00000035 StateManagerI E
org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView
Could not find saved view state for token -1909e0a
i have used Filter class to validate session which works fine if i click on
any otehr links apart from clicking on table or tabs in jspx pages.
Did you happen to get a solution for this issue? if so can you please share
it with me?
olip wrote:
>
> Hi everyone,
>
> Is there a way to deal with expired sessions when you click on a tab from
> the component Tabset and it has already expired?
> It throws me some Rendering phase errors because all of the server-side
> data is lost.
> I am using the new tabset class from chenillekit.
>
> I tried the tips from this forum to redirect to the login page in your
> dispatcher but the dispatch() is not called/or called after the exception
> was thrown (think this is ajax related).
> Thank you for your help
> Oliver
>
--
View this message in context: http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2460754.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Tabset and expired Sessions
Posted by olip <ol...@googlemail.com>.
Thanks, this works great!
Peter Stavrinides wrote:
>
> Its very simple, just check for the header X-Requested-With in a filter,
> or in a page inject the Request:
>
> @Inject
> private Request _request;
>
> //a block with a form
> @Inject
> @Id("formBlock")
> private Block _formBlock;
>
>
> //some event method (for an AJAX event return my block)
> @OnEvent(component = "choose")
> Object onChoose() {
> return _request.isXHR() ? _formBlock : null;
> }
>
> cheers,
> Peter
>
> Hi Peter,
> Thanks for the tip, do you have an working example for this?
> Where would I check the request.isXHR, in the Dispatchers dispatch I quess
> ?
>
>
> Peter Stavrinides wrote:
>>
>> I remember having a similar issue with some AJAX components, I have not
>> tried this particular one you refer to, so this is just a guess, but
>> sounds like you need to check for request.isXHR to determine if the
>> request is an AJAX request in your page, then handle the error (mostly a
>> simple reload of the page is enough).
>>
>> Cheers,
>> Peter
>>
>> ----- Original Message -----
>> From: "ravizzzzz" <ra...@gmail.com>
>> To: users@tapestry.apache.org
>> Sent: Wednesday, 11 March, 2009 13:04:48 GMT +02:00 Athens, Beirut,
>> Bucharest, Istanbul
>> Subject: Re: T5: Tabset and expired Sessions
>>
>>
>> Hello Olip,
>>
>> I am having same issues. I am not very sure about the disptacher you are
>> talking about. But in my case h jspx pages using <tr:panelTabbed> does
>> not
>> time out in UI and log out but throws an exception in console as below:-
>>
>> [3/4/09 16:19:01:125 IST] 00000035 StateManagerI E
>> org.apache.myfaces.trinidadinternal.application.StateManagerImpl
>> restoreView
>> Could not find saved view state for token -1909e0a
>>
>> i have used Filter class to validate session which works fine if i click
>> on
>> any otehr links apart from clicking on table or tabs in jspx pages.
>>
>> Did you happen to get a solution for this issue? if so can you please
>> share
>> it with me?
>>
>>
>> olip wrote:
>>>
>>> Hi everyone,
>>>
>>> Is there a way to deal with expired sessions when you click on a tab
>>> from
>>> the component Tabset and it has already expired?
>>> It throws me some Rendering phase errors because all of the server-side
>>> data is lost.
>>> I am using the new tabset class from chenillekit.
>>>
>>> I tried the tips from this forum to redirect to the login page in your
>>> dispatcher but the dispatch() is not called/or called after the
>>> exception
>>> was thrown (think this is ajax related).
>>> Thank you for your help
>>> Oliver
>>>
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2460754.html
>> Sent from the Tapestry Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>
> --
> View this message in context:
> http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2460941.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://n2.nabble.com/T5%3A-Tabset-and-expired-Sessions-tp2456002p2490424.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org