craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > Events/Actions Post New Topic   Post A Reply
DBTableEventListener not always firing event when multiple s... printer friendly version
next newest post | next oldest post
Author Messages
marinaj
Private First Class

Gender: Unspecified
Location:
Registered: Oct 2007
Status: Offline
Posts: 11

Click here to see the profile for marinaj Send email to marinaj Find more posts by marinaj Edit or delete this message Reply w/Quote
Posted Wednesday, October 3, 2007 @ 11:14:19  

I have a quicktable in use, and I have added as a DBTableEventListener a class which extends DBTableEventListener and overrides the method public void afterRowSelectionChange(int fromRow, int toRow).

I am doing this so that I can ask the controller in my own MVC controller to control certain actions which may be enabled or disabled, depending on which row or rows are selected.

When multiple rows are selected (using ctrl + mouse click) I have found that my overridden method, afterRowSelectionChange(int fromRow, int toRow). only runs on the first click, and on subsequent clicks if the row has a lower row number (i.e. nearer the top of the table) than the initially selected row. But if a row lower down the table than my originally selected row is selected the method is not run.

So, for example, if I have a 10 row table, and the first row I select is row 5, then the method runs.
If I then add , say, row 8 to my selected set (using ctrl + click) it does not run, but if I add row 3, it does run.

So my questions are:

1) Is this method meant to fire for every selection in multiple selections

and if not

2) Is there a method in DBTableEventListener that will fire for all selections when making multiple selections.

I am using jdk1.6.0_01

Your help would be appreciated.

Kind regards

Marina James

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Wednesday, October 3, 2007 @ 21:27:34  

We will look into this problem.

Can you try to use beforeRowSelectionChange() instead of afterRowSelectionChange ?

marinaj
Private First Class

Gender: Unspecified
Location:
Registered: Oct 2007
Status: Offline
Posts: 11

Click here to see the profile for marinaj Send email to marinaj Find more posts by marinaj Edit or delete this message Reply w/Quote
Posted Thursday, October 4, 2007 @ 04:44:07  

Hi

Thanks for your quick reply

The method beforeRowSelectionChange(int fromRow, int toRow, int fromColumn, int toColumn) does indeed run for every row selected - I'll use this instead.

Kind regards

Marina

marinaj
Private First Class

Gender: Unspecified
Location:
Registered: Oct 2007
Status: Offline
Posts: 11

Click here to see the profile for marinaj Send email to marinaj Find more posts by marinaj Edit or delete this message Reply w/Quote
Posted Thursday, October 4, 2007 @ 05:22:15  

Hi again

I am using the alternative method (beforeRowSelectionChanged) - but it is not ideal as at this point the selectedRows array will still hold all previously selected rows, even if the latest row selection is a single selection. (I can code around this with some fairly clumsy code)

Therefore, if you do find the cause of the original method not always firing, I would appreciate your feedback.

Kind regards

Marina

Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Thursday, October 4, 2007 @ 20:37:17  

There is a bug in the current code. During multiple selection afterRowSelectionChange may not work as expected. We will look into it and release an update in a week.
marinaj
Private First Class

Gender: Unspecified
Location:
Registered: Oct 2007
Status: Offline
Posts: 11

Click here to see the profile for marinaj Send email to marinaj Find more posts by marinaj Edit or delete this message Reply w/Quote
Posted Friday, October 5, 2007 @ 07:06:08  

Thank you
Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Thursday, October 25, 2007 @ 22:16:29  

Please use the latest version from today, this problem should be resolved.
optotronic
Private

Gender: Unspecified
Location: Ohio
Registered: Oct 2010
Status: Offline
Posts: 3

Click here to see the profile for optotronic Visit http://ascendis.com Send email to optotronic Send private message to optotronic Find more posts by optotronic Edit or delete this message Reply w/Quote
Posted Friday, December 17, 2010 @ 09:05:15  

It looks like the problem still exists if shift+click is used to extend a selection. In other words, when shift+click is used to extend a selection, afterRowSelectionChange is not fired. I'm using QuickTable 2.0.5.31.

Finest regards,
Bill Root

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios