Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Redirect user to another page after closing application
Redirect user to another page after closing application [message #80046] Mon, 31 March 2008 03:57 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 #80200 is a reply to message #80046] Mon, 31 March 2008 09:04 Go to previous messageGo to next message
Tiago is currently offline TiagoFriend
Messages: 55
Registered: July 2009
Member
Hi,

I would try the WorkbenchWindowAdvisor#postWindowClose().

Tiago

Setya wrote:
> 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 #80226 is a reply to message #80200] Mon, 31 March 2008 10:40 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Tiago,

> I would try the WorkbenchWindowAdvisor#postWindowClose().

Thanks.

What about WorkbenchWindowAdvisor#postShutdown(), wouldn't it be safer to
call it here since this is the last event invoked ?

Best Regards,

Setya
Re: Redirect user to another page after closing application [message #80450 is a reply to message #80226] Tue, 01 April 2008 03:38 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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
Re: Redirect user to another page after closing application [message #80676 is a reply to message #80450] Tue, 01 April 2008 12:56 Go to previous message
Eclipse UserFriend
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
Previous Topic:Move some coolbar actions location to the right most
Next Topic:Custom JavaScript code gets loaded but not executed
Goto Forum:
  


Current Time: Fri Sep 20 21:48:59 GMT 2024

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

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

Back to the top