Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Browser's IServiceHandler request doesn't fire.
Browser's IServiceHandler request doesn't fire. [message #109451] Thu, 16 October 2008 19:05 Go to next message
Mark Freiheit is currently offline Mark FreiheitFriend
Messages: 30
Registered: July 2009
Member
Hello, Please forgive me if this is a well known issue addressed
elsewhere. I was unable to find a reference to this particular issue.

We are currently using a Browser component in our RAP application to serve
up a dynamic image. We are setting an html image source to use our custom
service handler via ...?custom_service_handler=myChartService... so that
the server will fulfill this request through the handler we register with
the service.

This works very well except when we update this image when the containing
view is being activated (via part listener) or in reaction to a selection
listener during a perspective transition. It appears that the call to
browser.setText(html) is not generating a request during this time. I
wonder if the re-draw of the views/perspective is optimizing away this
specific request. Is this a known issue? Is there a known work-around?
Is there a particular event I can detect, after which I can refresh the
browser image?

Thanks very much for whatever insight your team can provide -- Mark
Re: Browser's IServiceHandler request doesn't fire. [message #109590 is a reply to message #109451] Fri, 17 October 2008 09:44 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Mark,

maybe this is a caching problem of your browser. Could you try adding an
abitrary number as query-string to the URL? You could also use Firebug
in Firefox to check, if the browser fires the request.
Just a guess...

Regards,
Stefan.


Mark Freiheit schrieb:
> Hello, Please forgive me if this is a well known issue addressed
> elsewhere. I was unable to find a reference to this particular issue.
>
> We are currently using a Browser component in our RAP application to
> serve up a dynamic image. We are setting an html image source to use
> our custom service handler via
> ...?custom_service_handler=myChartService... so that the server will
> fulfill this request through the handler we register with the service.
>
> This works very well except when we update this image when the
> containing view is being activated (via part listener) or in reaction to
> a selection listener during a perspective transition. It appears that
> the call to browser.setText(html) is not generating a request during
> this time. I wonder if the re-draw of the views/perspective is
> optimizing away this specific request. Is this a known issue? Is there
> a known work-around? Is there a particular event I can detect, after
> which I can refresh the browser image?
>
> Thanks very much for whatever insight your team can provide -- Mark
>
Re: Browser's IServiceHandler request doesn't fire. [message #109762 is a reply to message #109590] Fri, 17 October 2008 20:45 Go to previous messageGo to next message
Mark Freiheit is currently offline Mark FreiheitFriend
Messages: 30
Registered: July 2009
Member
It is unlikely a caching issue. Part of my due-diligence was to make sure
the URL parameters had changed between requests. Even if the URL was the
same, the thread running the service handler would always receive the
request (that is, it would hit my breakpoints) whenever
browser.setText(URL) was called.

I am not familiar with the architecture of the leading browsers, but it
seems like they handle multiple requests fairly well. Specifically to
support the precise thing I am doing with the browser component making
independent requests for updates due to data model changes.

Is there a point in RAP processing where requests are ignored? Is all RAP
request firing handled by the browser?

Thanks for your help -- Mark
Re: Browser's IServiceHandler request doesn't fire. [message #109879 is a reply to message #109451] Mon, 20 October 2008 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

maybe I'm don't understand it correctly, but why are you calling
Browser#setText() and not Browser#setURL()?


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Mark Freiheit [mailto:freiheit@speakeasy.net]
Bereitgestellt: Donnerstag, 16. Oktober 2008 21:05
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Browser's IServiceHandler request doesn't fire.
Betreff: Browser's IServiceHandler request doesn't fire.

Hello, Please forgive me if this is a well known issue addressed
elsewhere. I was unable to find a reference to this particular issue.

We are currently using a Browser component in our RAP application to
serve
up a dynamic image. We are setting an html image source to use our
custom
service handler via ...?custom_service_handler=myChartService... so that

the server will fulfill this request through the handler we register
with
the service.

This works very well except when we update this image when the
containing
view is being activated (via part listener) or in reaction to a
selection
listener during a perspective transition. It appears that the call to
browser.setText(html) is not generating a request during this time. I
wonder if the re-draw of the views/perspective is optimizing away this
specific request. Is this a known issue? Is there a known work-around?

Is there a particular event I can detect, after which I can refresh the
browser image?

Thanks very much for whatever insight your team can provide -- Mark
Re: Browser's IServiceHandler request doesn't fire. [message #109913 is a reply to message #109879] Mon, 20 October 2008 15:44 Go to previous messageGo to next message
Mark Freiheit is currently offline Mark FreiheitFriend
Messages: 30
Registered: July 2009
Member
I call setText because I am setting the Browser's HTML contents.

The HTML follows

"<html><head></head><body><center>"
+ " <img
src=\" {0}?custom_service_handler=chartservice&prj={1}&x={2 }&y={3}\ " "
+ " alt=\"Pie Chart\" /> </center></body></html>";

As you can see, it is a simple image tag with a source parameter that
drives a second request to the service. As I mentioned earlier, this
seems to generally work, except when I am in a transition state between
perspectives.
Re: Browser's IServiceHandler request doesn't fire. [message #110062 is a reply to message #109913] Tue, 21 October 2008 16:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hm,

I remember a similar problem that was caused by an timing issue. Using
'settimeout' in Javascript to delay the second request a few ms solved
the problem. In your case you could try to set the source attribute of
you img tag using such a javascript snippet.

Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Mark Freiheit [mailto:freiheit@speakeasy.net]
Bereitgestellt: Montag, 20. Oktober 2008 17:44
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Browser's IServiceHandler request doesn't fire.
Betreff: Re: Browser's IServiceHandler request doesn't fire.

I call setText because I am setting the Browser's HTML contents.

The HTML follows

"<html><head></head><body><center>"
+ " <img
src=\" {0}?custom_service_handler=chartservice&prj={1}&x={2 }&y={3}\ " "
+ " alt=\"Pie Chart\" /> </center></body></html>";

As you can see, it is a simple image tag with a source parameter that
drives a second request to the service. As I mentioned earlier, this
seems to generally work, except when I am in a transition state between
perspectives.
Re: Browser's IServiceHandler request doesn't fire. [message #111305 is a reply to message #110062] Wed, 05 November 2008 22:29 Go to previous messageGo to next message
Mark Freiheit is currently offline Mark FreiheitFriend
Messages: 30
Registered: July 2009
Member
I just wanted to close this out with my results on this issue.

It turns out that it was a caching issue, but not quite in the way I was
expecting. A co-worker (Thanks Scott Warner!) showed me that if the URL
does not change, the event doesn't fire. By forcing a boolean parameter
that toggles between true and false, one can force the browser URL request
to fire every time.
Re: Browser's IServiceHandler request doesn't fire. [message #111408 is a reply to message #111305] Thu, 06 November 2008 08:41 Go to previous message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
> It turns out that it was a caching issue,

That's what I said :-)

To be absolutely sure you could also use the current timestamp in
milliseconds and attach it as parameter.

At least, this works for us.
Regards,
Stefan.


Mark Freiheit schrieb:
>
> expecting. A co-worker (Thanks Scott Warner!) showed me that if the URL
> does not change, the event doesn't fire. By forcing a boolean parameter
> that toggles between true and false, one can force the browser URL
> request to fire every time.
>
Previous Topic:bundle.getEntry( path ) returns null
Next Topic:Can't run agains source code of 1.11
Goto Forum:
  


Current Time: Tue Apr 23 13:17:59 GMT 2024

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

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

Back to the top