Skip to main content



      Home
Home » Eclipse Projects » JFace » ObservableValueEditingSupport sets model value 1st time even if not changed
ObservableValueEditingSupport sets model value 1st time even if not changed [message #22595] Wed, 22 July 2009 09:05 Go to next message
Eclipse UserFriend
I have been using the ObservableValueEditingSupport for various cell
editors and have noticed that if you click in a cell (eg to show a
TextCellEditor) and then click out of it (without changing its value) the
model is updated regardless.

Within ValueBinding there is a targetChangeListener which attempts to
prevent this by checking if the old and new values are the same. The first
time the cell editor binding is used however, the cell editors 'old' value
is empty, it thinks its current value and old value are different, so the
model is updated with the value it already has.

Property binding used elsewhere doesn't do this.

This becomes apparent more so if using EMF property binding with a
commandstack as the command stack becomes dirty yet the model values have
not actually changed.
Re: ObservableValueEditingSupport sets model value 1st time even if not changed [message #23114 is a reply to message #22595] Wed, 22 July 2009 17:13 Go to previous messageGo to next message
Eclipse UserFriend
Would you file a bug against Platform/UI for this?

Matthew

Matt Biggs wrote:
> I have been using the ObservableValueEditingSupport for various cell
> editors and have noticed that if you click in a cell (eg to show a
> TextCellEditor) and then click out of it (without changing its value)
> the model is updated regardless.
> Within ValueBinding there is a targetChangeListener which attempts to
> prevent this by checking if the old and new values are the same. The
> first time the cell editor binding is used however, the cell editors
> 'old' value is empty, it thinks its current value and old value are
> different, so the model is updated with the value it already has.
> Property binding used elsewhere doesn't do this.
> This becomes apparent more so if using EMF property binding with a
> commandstack as the command stack becomes dirty yet the model values
> have not actually changed.
>
Re: ObservableValueEditingSupport sets model value 1st time even if not changed [message #23408 is a reply to message #23114] Thu, 23 July 2009 01:56 Go to previous message
Eclipse UserFriend
Filed bug 284366

cheers

Matthew Hall wrote:
> Would you file a bug against Platform/UI for this?
>
> Matthew
>
> Matt Biggs wrote:
>> I have been using the ObservableValueEditingSupport for various cell
>> editors and have noticed that if you click in a cell (eg to show a
>> TextCellEditor) and then click out of it (without changing its value)
>> the model is updated regardless.
>> Within ValueBinding there is a targetChangeListener which attempts to
>> prevent this by checking if the old and new values are the same. The
>> first time the cell editor binding is used however, the cell editors
>> 'old' value is empty, it thinks its current value and old value are
>> different, so the model is updated with the value it already has.
>> Property binding used elsewhere doesn't do this.
>> This becomes apparent more so if using EMF property binding with a
>> commandstack as the command stack becomes dirty yet the model values
>> have not actually changed.
>>
Previous Topic:[CellEditor] Find the currently active CellEditor in a TableViewer (3.3 API)
Next Topic:Changing foreground/background color of selected table row
Goto Forum:
  


Current Time: Sun Apr 27 01:57:25 EDT 2025

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

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

Back to the top