Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » UICallbacks are canceled when pressing ESC in Browser
UICallbacks are canceled when pressing ESC in Browser [message #109693] Fri, 17 October 2008 11:45 Go to next message
Eclipse UserFriend
Hi,

I noticed that (at least in Firefox) the UICallback-Request can be
canceled by the user if he presses ESC having some element outside the
RAP application focussed.

This can be reproduced with the RAP widget demo on the tab ProgressBar.
Simply click on "Start Background Progress" and then click in the
browser's address text and press ESC.

I experimented with adding a Failed-EventListener on the qx-side to get
notified when a UICallbackRequest failed. The idea was to fire the
request again in this case. It didn't work as expected and I am not sure
if this is a good approach.

Any thoughts about that?
Stefan.
Re: UICallbacks are canceled when pressing ESC in Browser [message #109885 is a reply to message #109693] Mon, 20 October 2008 04:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

the problem doesn't show up with IE but can easily be reproduced with
FF. I assume that the request thread could still be locked on the server
side and should be released. So I agree that a client-side only solution
may not be the best solution. But one question is how to detect on the
serverside that the request has been canceled? Or did you try to pass
the information about the failed request to the server using that
Failed-EventListener?


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Stefan Roeck [mailto:stefan.roeck@cas.de]
Bereitgestellt: Freitag, 17. Oktober 2008 17:46
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: UICallbacks are canceled when pressing ESC in Browser
Betreff: UICallbacks are canceled when pressing ESC in Browser

Hi,

I noticed that (at least in Firefox) the UICallback-Request can be
canceled by the user if he presses ESC having some element outside the
RAP application focussed.

This can be reproduced with the RAP widget demo on the tab ProgressBar.
Simply click on "Start Background Progress" and then click in the
browser's address text and press ESC.

I experimented with adding a Failed-EventListener on the qx-side to get
notified when a UICallbackRequest failed. The idea was to fire the
request again in this case. It didn't work as expected and I am not sure

if this is a good approach.

Any thoughts about that?
Stefan.
Re: UICallbacks are canceled when pressing ESC in Browser [message #109906 is a reply to message #109885] Mon, 20 October 2008 07:25 Go to previous messageGo to next message
Eclipse UserFriend
Hi Frank,

I believe that hitting the ESC key by the user doesn't happen by
intention, so the aim is to restore the UICallback request to get it
working again. Do you agree?

What I tried was to start a new request on the client side which (I
hoped) would have been handled by the old thread on the server side. The
problem then is, that the Failedevent-Listener is also called when the
user navigates to another page which probably isn't intended.

My JS error handler in Request.js looked like this:

_handleUICallBackFailed : function ( evt ) {
if( this._isConnectionError( evt.getStatusCode() ) ) {
var failedRequest = evt.getTarget().getRequest();
var failedParameters = failedRequest.getParameters();

for( var parameterName in failedParameters ) {
service_param = parameterName;
service_id = failedParameters[ parameterName ];
}
var url = failedRequest.getUrl();
this.enableUICallBack(url, service_param, service_id )
}
},


Before finding out the reason why this doesn't work as expected
(progress bar didn't continue running) I just wanted to hear other
opinions about this approach...

Regards,
Stefan.








Frank Appel schrieb:
> Hi,
>
> the problem doesn't show up with IE but can easily be reproduced with
> FF. I assume that the request thread could still be locked on the server
> side and should be released. So I agree that a client-side only solution
> may not be the best solution. But one question is how to detect on the
> serverside that the request has been canceled? Or did you try to pass
> the information about the failed request to the server using that
> Failed-EventListener?
>
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: Stefan Roeck [mailto:stefan.roeck@cas.de]
> Bereitgestellt: Freitag, 17. Oktober 2008 17:46
> Bereitgestellt in: eclipse.technology.rap
> Unterhaltung: UICallbacks are canceled when pressing ESC in Browser
> Betreff: UICallbacks are canceled when pressing ESC in Browser
>
> Hi,
>
> I noticed that (at least in Firefox) the UICallback-Request can be
> canceled by the user if he presses ESC having some element outside the
> RAP application focussed.
>
> This can be reproduced with the RAP widget demo on the tab ProgressBar.
> Simply click on "Start Background Progress" and then click in the
> browser's address text and press ESC.
>
> I experimented with adding a Failed-EventListener on the qx-side to get
> notified when a UICallbackRequest failed. The idea was to fire the
> request again in this case. It didn't work as expected and I am not sure
>
> if this is a good approach.
>
> Any thoughts about that?
> Stefan.
>
Re: UICallbacks are canceled when pressing ESC in Browser [message #110050 is a reply to message #109906] Tue, 21 October 2008 12:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

I also would not consider hitting the ESC button by the user is done
intentionally - at least if there's no progress dialog. This could be an
attempt to cancel the job...

But considering your approach I remember that there is a serverside
mechanism in the UICallBackManager that blocks only an incomming request
if no other request is already blocked. So if the thread of the aborted
request is still locked on the server side your additional request will
be ignored.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Stefan Roeck [mailto:stefan.roeck@cas.de]
Bereitgestellt: Montag, 20. Oktober 2008 13:26
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: UICallbacks are canceled when pressing ESC in Browser
Betreff: Re: UICallbacks are canceled when pressing ESC in Browser

Hi Frank,

I believe that hitting the ESC key by the user doesn't happen by
intention, so the aim is to restore the UICallback request to get it
working again. Do you agree?

What I tried was to start a new request on the client side which (I
hoped) would have been handled by the old thread on the server side. The

problem then is, that the Failedevent-Listener is also called when the
user navigates to another page which probably isn't intended.

My JS error handler in Request.js looked like this:

_handleUICallBackFailed : function ( evt ) {
if( this._isConnectionError( evt.getStatusCode() ) ) {
var failedRequest = evt.getTarget().getRequest();
var failedParameters = failedRequest.getParameters();

for( var parameterName in failedParameters ) {
service_param = parameterName;
service_id = failedParameters[ parameterName ];
}
var url = failedRequest.getUrl();
this.enableUICallBack(url, service_param, service_id )
}
},


Before finding out the reason why this doesn't work as expected
(progress bar didn't continue running) I just wanted to hear other
opinions about this approach...

Regards,
Stefan.








Frank Appel schrieb:
> Hi,
>
> the problem doesn't show up with IE but can easily be reproduced with
> FF. I assume that the request thread could still be locked on the
server
> side and should be released. So I agree that a client-side only
solution
> may not be the best solution. But one question is how to detect on the
> serverside that the request has been canceled? Or did you try to pass
> the information about the failed request to the server using that
> Failed-EventListener?
>
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: Stefan Roeck [mailto:stefan.roeck@cas.de]
> Bereitgestellt: Freitag, 17. Oktober 2008 17:46
> Bereitgestellt in: eclipse.technology.rap
> Unterhaltung: UICallbacks are canceled when pressing ESC in Browser
> Betreff: UICallbacks are canceled when pressing ESC in Browser
>
> Hi,
>
> I noticed that (at least in Firefox) the UICallback-Request can be
> canceled by the user if he presses ESC having some element outside the
> RAP application focussed.
>
> This can be reproduced with the RAP widget demo on the tab
ProgressBar.
> Simply click on "Start Background Progress" and then click in the
> browser's address text and press ESC.
>
> I experimented with adding a Failed-EventListener on the qx-side to
get
> notified when a UICallbackRequest failed. The idea was to fire the
> request again in this case. It didn't work as expected and I am not
sure
>
> if this is a good approach.
>
> Any thoughts about that?
> Stefan.
>
Re: UICallbacks are canceled when pressing ESC in Browser [message #110621 is a reply to message #110050] Tue, 28 October 2008 05:30 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------090309000308090005020804
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

I attached a first draft of a patch which seems to work in some first
tests. Could someone revise this?


Thanks & Regards,
Stefan.


Frank Appel schrieb:
> Hi,
>
> I also would not consider hitting the ESC button by the user is done
> intentionally - at least if there's no progress dialog. This could be an
> attempt to cancel the job...
>
> But considering your approach I remember that there is a serverside
> mechanism in the UICallBackManager that blocks only an incomming request
> if no other request is already blocked. So if the thread of the aborted
> request is still locked on the server side your additional request will
> be ignored.
>
>
> Ciao
> Frank
>
> -----Urspr
Re: UICallbacks are canceled when pressing ESC in Browser [message #699585 is a reply to message #110621] Thu, 21 July 2011 16:49 Go to previous messageGo to next message
Eclipse UserFriend
I found this problem too. It cause the user cannot cancel editing in a text cell editor.
Re: UICallbacks are canceled when pressing ESC in Browser [message #699732 is a reply to message #699585] Fri, 22 July 2011 03:59 Go to previous message
Eclipse UserFriend
Hi,
recently, the UICallBack system in RAP was redesigned in CVS HEAD. See bug:
344989: Redesign UICallback subsystem
https://bugs.eclipse.org/bugs/show_bug.cgi?id=344989
as a result the following bug has been fixed too:
260117: UICallBack breaks after failed request
https://bugs.eclipse.org/bugs/show_bug.cgi?id=260117
Best,
Ivan

On 7/21/2011 11:49 PM, Xihui Chen wrote:
> I found this problem too. It cause the user cannot cancel editing in a
> text cell editor.
Previous Topic:bg-job/ui-thread problem
Next Topic:OSGI console doesn't startup
Goto Forum:
  


Current Time: Wed Sep 17 17:03:48 EDT 2025

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

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

Back to the top