Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to redirect the complete browser url to a different page
How to redirect the complete browser url to a different page [message #832078] Thu, 29 March 2012 14:43 Go to next message
Eclipse UserFriend
Hi,

in RAP 1.4 I used a RAP internal API to redirect to a different page. How can I achive the same behavior in RAP 1.5M6?

In RAP 1.4 I used the following code:

// FIXME currently no public API is available
ContextProvider.getStateInfo().getResponseWriter().write("parent.window.location.href=\"" + url + "\";");

Any help is welcome.

Thanks.

Karsten
Re: How to redirect the complete browser url to a different page [message #832098 is a reply to message #832078] Thu, 29 March 2012 15:11 Go to previous messageGo to next message
Eclipse UserFriend
Hi Karsten,
use JSExecutor class:
JSExecutor.executeJS( "parent.window.location.href=\"" + url + "\";" );
It is currently internal too, but we have plans to make it public:
342995: Provide a public JSExecutor API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=342995
HTH,
Ivan

On 3/29/2012 9:43 PM, Karsten Voigt wrote:
> Hi,
>
> in RAP 1.4 I used a RAP internal API to redirect to a different page.
> How can I achive the same behavior in RAP 1.5M6?
>
> In RAP 1.4 I used the following code:
>
> // FIXME currently no public API is available
> ContextProvider.getStateInfo().getResponseWriter().write("parent.window.location.href=\""
> + url + "\";");
>
> Any help is welcome.
>
> Thanks.
>
> Karsten

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: How to redirect the complete browser url to a different page [message #832113 is a reply to message #832098] Thu, 29 March 2012 15:39 Go to previous message
Eclipse UserFriend
Thx, that helped.
Previous Topic:Displayed standard trim toolbar in custom Presentation Factory
Next Topic:How to create a popup window
Goto Forum:
  


Current Time: Wed Jun 18 04:22:58 EDT 2025

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

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

Back to the top