|
Re: How to restart a rap-session? [message #128020 is a reply to message #127913] |
Wed, 15 April 2009 11:12 |
Eclipse User |
|
|
|
Originally posted by: bjoern.bjoernfischer.de
Hi,
you could achieve a restart by creating a browser widget on a new shell
after the workbench stopped.
This would be in your Entrypoint and looks about like this:
----------------------------------------------------
public int createUI() {
Display display = PlatformUI.createDisplay();
int result = PlatformUI.createAndRunWorkbench(display,
new ApplicationWorkbenchAdvisor());
Shell shell = new Shell( display, SWT.NONE );
shell.setLayout( new FillLayout() );
Browser browser = new Browser( shell, SWT.NONE );
String page = "<html><head><title></title>"
+ "<meta http-equiv=\"refresh\"
content=\"0;url=http://www.google.com\";>"
+ "<script type=\"text/javascript\">"
+ "if (top != self) top.location = self.location;"
+ "</script></head><body></body></html>";
browser.setText( page );
shell.setMaximized( true );
shell.open();
return result;
}
----------------------------------------------------
Replace the URL (here google.com) by the URL to your rap servlet and the
restart is done.
Regards,
Björn
p-lex schrieb:
> Hello,
>
> Refering to my post on
> ( http://www.eclipse.org/newsportal/article.php?id=5776&gr oup=eclipse.technology.rap#5776)
> I want to restart the session when the timeout was reached.
>
> Is there a way to do it? I'm still searching for a solution.
>
> If I run the exit-action (ActionFactory.QUIT.create(window)) the app
> just exits. But how can I realize a restart-behavior?
>
> Thanks
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03363 seconds