Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Disable Refresh-Key F5(Has anyone an solution how to disable browser refresh and navigation?)
icon5.gif  Disable Refresh-Key F5 [message #495897] Fri, 06 November 2009 14:49 Go to next message
Stephan Strittmatter is currently offline Stephan StrittmatterFriend
Messages: 11
Registered: July 2009
Junior Member
In some situations I receive empty pages if the user presses F5 to refresh the browser view.

How could this be prevented?

[Updated on: Fri, 06 November 2009 14:49]

Report message to a moderator

Re: Disable Refres-Key F5 [message #496164 is a reply to message #495897] Mon, 09 November 2009 08:44 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
So far, I haven't seen such a thing. Please file a bug if you can
provide steps how to reproduce this.

Stephan Strittmatter wrote:
> In some situations I receive empty pages if the user presses F5 to
> refresh the browser view.
>
> How could this be prevented?
Re: Disable Refresh-Key F5 [message #496396 is a reply to message #495897] Mon, 09 November 2009 21:17 Go to previous messageGo to next message
Stephan Strittmatter is currently offline Stephan StrittmatterFriend
Messages: 11
Registered: July 2009
Junior Member
Investigating, I found, it has something to do with our login dialog, which is shown before the workbench is opened:

On RCP we have a login dialog, we ported to RAP. On successful authentication the workbench is opened.

If this login dialog is shown and the user presses F5 we get an IllegalStateException, because context is disposed":
Exception in thread "UIThread [1cbbpavfmu50w]" java.lang.IllegalStateException: The context has been disposed.
	at org.eclipse.rwt.internal.service.ServiceContext.checkState(ServiceContext.java:154)
	at org.eclipse.rwt.internal.service.ServiceContext.getStateInfo(ServiceContext.java:104)
	at org.eclipse.rwt.internal.service.ContextProvider.getStateInfo(ContextProvider.java:166)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:126)
	at java.lang.Thread.run(Thread.java:810)


The same if the session is terminated and the restart page should be displayed.
Re: Disable Refresh-Key F5 [message #496574 is a reply to message #496396] Tue, 10 November 2009 15:21 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
If you can provide to code to reproduce please open a bugzilla.
Don't forget to state the version you are using.

Stephan Strittmatter wrote:
> Investigating, I found, it has something to do with our login dialog,
> which is shown before the workbench is opened:
>
> On RCP we have a login dialog, we ported to RAP. On successful
> authentication the workbench is opened.
> If this login dialog is shown and the user presses F5 we get an
> IllegalStateException, because context is disposed":
>
> Exception in thread "UIThread [1cbbpavfmu50w]"
> java.lang.IllegalStateException: The context has been disposed.
> at
> org.eclipse.rwt.internal.service.ServiceContext.checkState(S erviceContext.java:154)
>
> at
> org.eclipse.rwt.internal.service.ServiceContext.getStateInfo (ServiceContext.java:104)
>
> at
> org.eclipse.rwt.internal.service.ContextProvider.getStateInf o(ContextProvider.java:166)
>
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:126)
>
> at java.lang.Thread.run(Thread.java:810)
>
>
> The same if the session is terminated and the restart page should be
> displayed.
Re: Disable Refresh-Key F5 [message #499582 is a reply to message #496574] Mon, 23 November 2009 12:20 Go to previous messageGo to next message
Stephan Strittmatter is currently offline Stephan StrittmatterFriend
Messages: 11
Registered: July 2009
Junior Member
Currently it is really difficult to extract the example, but when the mor prio issues are done, I will start.
Re: Disable Refresh-Key F5 [message #502950 is a reply to message #495897] Thu, 10 December 2009 12:19 Go to previous messageGo to next message
Sascha Becher is currently offline Sascha BecherFriend
Messages: 17
Registered: December 2009
Junior Member
My problem is alike to yours:
http://www.eclipse.org/forums/index.php?t=msg&th=159232& amp;start=0&S=eb168174f76c2cca8f5dd5677583d3a2

I'd like to detect a reload, rather than to disable it.
The Browser-Reload works fine with the online RAP demos, so I assume
methods, that intercept opening the perspective cause your problem.
Re: Disable Refresh-Key F5 [message #518869 is a reply to message #495897] Fri, 05 March 2010 10:47 Go to previous messageGo to next message
Sascha Seßler is currently offline Sascha SeßlerFriend
Messages: 3
Registered: October 2009
Junior Member
We found the reason for our problem and could finally fix it:

The login to our application was developed with the JAAS framework. If the login dialog is opened and you reload the web page, you get a ThreadDeathException from RAP. This exception was not caught in our LoginModule and JAAS transformed this exception into a default LoginException without any cause. Therefor the original ThreadDeathException was lost and RAP could not restart the application. Instead our JAAS handler tried to reload the login dialog, but meanwhile the RAP context has been disposed and we stuck at this point.

To solve this issue, we catch the ThreadDeathException and rethrow a special JAAS LoginException with the ThreadDeathException as cause. We can later on catch this LoginException in our JAAS application handler, extract the original ThreadDeathException and throw it. RAP now gets the ThreadDeathException and can then restart the application.
Re: Disable Refresh-Key F5 [message #558750 is a reply to message #518869] Tue, 14 September 2010 10:03 Go to previous message
Assen Sharlandjiev is currently offline Assen SharlandjievFriend
Messages: 17
Registered: January 2010
Location: Sofia, Bulgaria
Junior Member

Hi Sascha,

can you please share the implementation of your solution?
I catch the following exception: org.eclipse.rwt.internal.lifecycle.UIThread$UIThreadTerminat edError.
What should I do in order for RAP to restart the application?

thanks in advance,
Assen.
Previous Topic:Problem accessing /rap. Reason: ProxyServlet: /rap HTTP ERROR 404
Next Topic:close tabfolder
Goto Forum:
  


Current Time: Fri Apr 26 10:51:07 GMT 2024

Powered by FUDForum. Page generated in 0.03405 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top