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" <raviv2...@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-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@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-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@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-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to