Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Programmatically Edit TableViewer
Programmatically Edit TableViewer [message #652128] Wed, 02 February 2011 18:04 Go to next message
Sudesh Bulathsinhala is currently offline Sudesh BulathsinhalaFriend
Messages: 193
Registered: October 2010
Senior Member
hi,

we're using TableViewer in our search records dialog.

when a column is in middle of editing mode and search action is invoked which looks up the related search records, it doesn't return records related to column editing value.

alternatively if we hit enter or click another column of the viewer and then invoke the search event gives the desired results.

this is due to column is still in editing mode and i suspect the underlying model is not updated, unless if we hit enter or click another column in the viewer.

my question is how can we commit editing value of cell editor to underlying TableViewer model programmatically ?


rgs,
sudesh
Re: Programmatically Edit TableViewer [message #652816 is a reply to message #652128] Mon, 07 February 2011 07:43 Go to previous messageGo to next message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 8
Registered: December 2010
Junior Member
I´m not sure if got your question, but maybe you can add a Modifylistener to the Text widget of your TableCellEditor and update your model, each time you type a new letter.

The disadvantage would be that a lot of calls are done, because your model will be updated every time you type a letter. If you use databinding maybe you can use the delay functionality.

Greetz
Thomas
Re: Programmatically Edit TableViewer [message #652824 is a reply to message #652816] Mon, 07 February 2011 08:41 Go to previous messageGo to next message
Sudesh Bulathsinhala is currently offline Sudesh BulathsinhalaFriend
Messages: 193
Registered: October 2010
Senior Member
Hello Thomas,

Well let me try with that option, but again I'm bit concerned as I suspect ModifyListener on RAP may be little expensive though.

Regards,
Sudesh
Re: Programmatically Edit TableViewer [message #653310 is a reply to message #652824] Wed, 09 February 2011 10:09 Go to previous message
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 8
Registered: December 2010
Junior Member
Hi Sudesh,

you´re right, in RAP this could be expensive, i didn´t know that you are using RAP.
Anyway i dont see any other approach, because you have to update your model whenever changing your UI, or you´re use the current text in the UI instead of the value in your model...

Best regards

Thomas
Previous Topic:how to sort ComboBoxCellEditor in a table
Next Topic:TreeViewer setSelection does not work properly
Goto Forum:
  


Current Time: Fri Apr 26 18:29:58 GMT 2024

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

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

Back to the top