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 13:04 Go to next message
Sudesh Bulathsinhala is currently offline Sudesh Bulathsinhala
Messages: 180
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 02:43 Go to previous messageGo to next message
T. Wilhelm is currently offline T. Wilhelm
Messages: 7
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 03:41 Go to previous messageGo to next message
Sudesh Bulathsinhala is currently offline Sudesh Bulathsinhala
Messages: 180
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 05:09 Go to previous message
T. Wilhelm is currently offline T. Wilhelm
Messages: 7
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:[DataBinding] ComboViewer binding Items and Text in Master/Detail
Next Topic:Word wrap capability of control
Goto Forum:
  


Current Time: Sat Aug 30 02:29:31 EDT 2014

Powered by FUDForum. Page generated in 0.02200 seconds