Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Override Busy Indicator - Cancel action(How to implement custom logic when cancelling the Busy Indicator)
Override Busy Indicator - Cancel action [message #1843596] Tue, 10 August 2021 10:54 Go to next message
Michiel Arentsen is currently offline Michiel ArentsenFriend
Messages: 2
Registered: May 2020
Junior Member
Hi all,

In my application people can query large amounts of data that may take some time depending on the constructed query.

When the query takes longer then 2.5 seconds (by default) a busy indicator shows up with a cancel button.
I would like to implement some logic when the user presses the cancel button, also the running database query is cancelled.

Does anyone know how i can catch that 'cancel' action so i can add some logic at that point?
I know how i can cancel the active user database query, but do not know where to implement that logic.

Thanks a lot for any help
Re: Override Busy Indicator - Cancel action [message #1843604 is a reply to message #1843596] Tue, 10 August 2021 12:20 Go to previous messageGo to next message
Matthias Villiger is currently offline Matthias VilligerFriend
Messages: 230
Registered: September 2011
Senior Member
Hi Michiel

You can try to implement a
org.eclipse.scout.rt.platform.transaction.ITransactionMember

See
org.eclipse.scout.rt.server.jdbc.AbstractSqlTransactionMember.cancel()
as a sample on how you could implement the cancel() method.

This member can e.g. be registered using
ITransaction.CURRENT.get().registerMemberIfAbsentAndNotCancelled()

You should register it before you create the resource that belongs to the transaction and needs some rollback or cancellation. At the moment the user cancels the operation the corresponding transaction will be cancelled as well and the cancel() method of your transaction member should be called.

Does this work for you?

Kind regards
Mat
Re: Override Busy Indicator - Cancel action [message #1843607 is a reply to message #1843604] Tue, 10 August 2021 12:49 Go to previous message
Michiel Arentsen is currently offline Michiel ArentsenFriend
Messages: 2
Registered: May 2020
Junior Member
Hi Mat,

Thanks for your quick reply.
I will have a look at your proposed solution.
I am quite a newbie i am not sure if i can make it work, but i will do my best and update this tread





Previous Topic:Widget FileChooserField. Scout 11
Next Topic:Error 404 after migrating to Scout 11
Goto Forum:
  


Current Time: Tue Mar 05 11:07:55 GMT 2024

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

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

Back to the top