Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Detect row editing finish
Detect row editing finish [message #481774] Mon, 24 August 2009 09:34
Marco Maccaferri is currently offline Marco MaccaferriFriend
Messages: 147
Registered: July 2009
Senior Member
Hi,

I have a table viewer populated with elements sorted by a date column,
the user needs to be able to edit all cells in a row, including the date
column, without causing a refresh and consequently a reordering of the
rows, but wants that the table to be sorted when it has finished editing
a row.

The first requirement is quite easy since sorting happens only when
calling viewer.refresh, the second requirement seems a bit difficult to
me, so far I haven't found a reliable way to detect when the user has
finished to edit a row.

The problem looks related to what the user means as "finished editing a
row". Basically the user is editing a row when it activates the cell
editors within the same row. Editing is finished when 1) the user clicks
on another row, or 2) clicks the blank space between the last row in the
viewer and the table boundaries, or 3) clicks on a button (for example
to add a new row or go to the next page in a wizard).

Adding a mouse listener to the table seems to work for 1 and 2, but not
for 3 (of course because the click happens outside the table). Adding a
focus listener should work for 3 but prevents the editors to be enabled
because a focusLost event is fired when an editor is activated (the
focus passes from the table to the editor).

Do you have any suggestion on how to accomplish this task ?

Regards,
Marco.
Previous Topic:Combo autocomplete
Next Topic:fieldassist
Goto Forum:
  


Current Time: Thu Apr 25 00:59:59 GMT 2024

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

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

Back to the top