Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:05 Go to next message
Matt Biggs is currently offline Matt BiggsFriend
Messages: 71
Registered: July 2009
Member
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 21:13 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
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 05:56 Go to previous message
Matt Biggs is currently offline Matt BiggsFriend
Messages: 71
Registered: July 2009
Member
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: Fri Dec 27 00:22:46 GMT 2024

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

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

Back to the top