Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Use BrowserHistory for Favourites
Use BrowserHistory for Favourites [message #987384] Mon, 26 November 2012 06:40 Go to next message
Eclipse User
Hi,

would it be possible to use the BrowserHistory mechanism for favorites?

For example, we want to be able to open a certain view or object if the
user opens the url "http:/outserver/servletName?objectToOpen=ViewId1".
Now the user can use this as bookmark and always ends up in the
application where he wants to.
The problem using this mechanism is, that if he now opens a favorite
"http:/outserver/servletName?objectToOpen=ViewId2" then the complete
application restarts which results in a new user login etc.

The BrowserHistory does not use parameters but anchers that do not lead
to a reload of the application. Our demand is, that if the user then
opens the application with "http:/outserver/servletName#ViewId1", than
the login happens and after that the user gets View1 displayed. If he
than opens up "http:/outserver/servletName#ViewId2" the user just gets
displayed View2 without leaving the application.

Is this somehow possible, maybe with the BrowserHistory?

Regards,
Markus
Re: Use BrowserHistory for Favourites [message #987460 is a reply to message #987384] Mon, 26 November 2012 12:13 Go to previous messageGo to next message
Lothar Werzinger is currently offline Lothar Werzinger
Messages: 148
Registered: July 2009
Location: Bay Area
Senior Member
Markus Krüger wrote:

> Hi,
>
> would it be possible to use the BrowserHistory mechanism for favorites?
>
> For example, we want to be able to open a certain view or object if the
> user opens the url "http:/outserver/servletName?objectToOpen=ViewId1".
> Now the user can use this as bookmark and always ends up in the
> application where he wants to.
> The problem using this mechanism is, that if he now opens a favorite
> "http:/outserver/servletName?objectToOpen=ViewId2" then the complete
> application restarts which results in a new user login etc.
>
> The BrowserHistory does not use parameters but anchers that do not lead
> to a reload of the application. Our demand is, that if the user then
> opens the application with "http:/outserver/servletName#ViewId1", than
> the login happens and after that the user gets View1 displayed. If he
> than opens up "http:/outserver/servletName#ViewId2" the user just gets
> displayed View2 without leaving the application.
>
> Is this somehow possible, maybe with the BrowserHistory?
>
> Regards,
> Markus

Hi Markus,

we have run into the same (and more) problem(s) like you and have asked
Eclipsesource to investigate.

We are using a BrowserHistoryListener to navigate to views and (pre)select
an item in the view.
We noticed that this only works for every 2nd invocation of the URL and
Eclipsesource created bug 394401 for that.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=394401


We also find that restarting the application for every navigation operation
is not desirable

https://bugs.eclipse.org/bugs/show_bug.cgi?id=389949


If you or anyone else on this discussion list are interested in sharing the
cost to fix this bug, please contact me.

Thanks!

Lothar
Re: Use BrowserHistory for Favourites [message #987463 is a reply to message #987384] Mon, 26 November 2012 12:22 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1286
Registered: July 2009
Senior Member

Hi Markus,

yes, the BrowserHistory can be used for deep links in 1.5. You can try
the deep links to the online demo [1] as an example. Please note that if
you change the fragment part of the URL manually after loading the
initial page, a listener will only be notified if createEntry() has been
called beforehand with the fragment part [2].

Best regards,
Ralf

[1] http://rap.eclipsesource.com/rapdemo/examples#tableviewer
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=394401

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Use BrowserHistory for Favourites [message #987854 is a reply to message #987460] Wed, 28 November 2012 07:07 Go to previous message
Eclipse User
We have now solved it not using the BrowserHistory by adding a JS to the
page that listens for URL changes. The JS calls a ServerViceHanlder that
i.e. opens a view or perspective. After the JS calls the service we
force a UI update via JS with org.eclipse.swt.Request.getInstance().send();

Am 26.11.2012 18:13, schrieb Lothar Werzinger:
> Markus Krüger wrote:
>
>> Hi,
>>
>> would it be possible to use the BrowserHistory mechanism for favorites?
>>
>> For example, we want to be able to open a certain view or object if the
>> user opens the url "http:/outserver/servletName?objectToOpen=ViewId1".
>> Now the user can use this as bookmark and always ends up in the
>> application where he wants to.
>> The problem using this mechanism is, that if he now opens a favorite
>> "http:/outserver/servletName?objectToOpen=ViewId2" then the complete
>> application restarts which results in a new user login etc.
>>
>> The BrowserHistory does not use parameters but anchers that do not lead
>> to a reload of the application. Our demand is, that if the user then
>> opens the application with "http:/outserver/servletName#ViewId1", than
>> the login happens and after that the user gets View1 displayed. If he
>> than opens up "http:/outserver/servletName#ViewId2" the user just gets
>> displayed View2 without leaving the application.
>>
>> Is this somehow possible, maybe with the BrowserHistory?
>>
>> Regards,
>> Markus
>
> Hi Markus,
>
> we have run into the same (and more) problem(s) like you and have asked
> Eclipsesource to investigate.
>
> We are using a BrowserHistoryListener to navigate to views and (pre)select
> an item in the view.
> We noticed that this only works for every 2nd invocation of the URL and
> Eclipsesource created bug 394401 for that.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=394401
>
>
> We also find that restarting the application for every navigation operation
> is not desirable
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=389949
>
>
> If you or anyone else on this discussion list are interested in sharing the
> cost to fix this bug, please contact me.
>
> Thanks!
>
> Lothar
>
Previous Topic:Trigger UI update with javascript
Next Topic:[CSS] How to import another css into my theme?
Goto Forum:
  


Current Time: Thu Apr 17 05:52:25 EDT 2014

Powered by FUDForum. Page generated in 0.02208 seconds