Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Redirect Page(Redirect Page)
Redirect Page [message #1743667] Sun, 18 September 2016 16:24 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi all,

In our standalone RAP application, when user opens it we show our login page, upon successful login we want to direct him to our main application within the same session without opening new browser tab/window, how to do this redirection/forwarding using RAP API ?

Any help would be greatly appreciated.

Thanks & Regards,
Stya
Re: Redirect Page [message #1743703 is a reply to message #1743667] Mon, 19 September 2016 06:55 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2286
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
that's only possible with RAP internals. Try this:

ContextProvider.getProtocolWriter().appendHead("redirect", url);

HTH,
Ivan
Re: Redirect Page [message #1743716 is a reply to message #1743703] Mon, 19 September 2016 08:16 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi Ivan,

Thank you for your suggestion.

I'm also able to achieve the same using:

final JavaScriptExecutor executor = RWT.getClient().getService(JavaScriptExecutor.class);
executor.execute("parent.window.location.href=\"" + redirectPath + "\";");


Which 1 is better ?

Regards,
Setya
Re: Redirect Page [message #1743722 is a reply to message #1743716] Mon, 19 September 2016 09:13 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2286
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi, technically it's the same.
Regards, Ivan
Previous Topic:RCPTT(RAP test framework) test movie
Next Topic:Javascript error on Hyperlink Widget
Goto Forum:
  


Current Time: Mon Oct 22 08:05:28 GMT 2018

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

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

Back to the top