Redirect user to another page after closing application [message #80046] |
Mon, 31 March 2008 03:57 |
|
Hi all,
After clicking a button that calls IWorkbench#close(), We want to direct
user to a another page. So far the only way we can think of is by calling
RWT.getResponse().sendRedirect, but at what event we should put this code ?
Any help would be greatly appreciated.
Best Regards,
Setya
|
|
|
|
|
|
Re: Redirect user to another page after closing application [message #80676 is a reply to message #80450] |
Tue, 01 April 2008 12:56 |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
currently I don't have any high sophisticated solutions, since we are
discussing redirecting problems in another thread already... So one you
won't like but that works:
public class MyEntryPoint implements IEntryPoint {
public int createUI()
Display display = PlatformUI.createDisplay();
int result = PlatformUI.createAndRunWorkbench( display, new
DemoWorbenchAdvisor() );
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://eclipse.org/rap\">"
+ "<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;
}
}
Ciao
Frank
-----Ursprüngliche Nachricht-----
Von: Setya [mailto:jsetya@gmail.com]
Bereitgestellt: Dienstag, 1. April 2008 05:38
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Redirect user to another page after closing application
Betreff: Re: Redirect user to another page after closing application
Hi,
I've tried calling :
RWT.getResponse().sendRedirect("http://localhost:9000/fes");
But it always return page that tells that the server session timed out.
Please advice.
Regards,
Setya
|
|
|
Powered by
FUDForum. Page generated in 0.04108 seconds