[Databinding] Why isn't there an ObservableValueEditingSupport.create() that takes update strategies [message #524138] |
Tue, 30 March 2010 17:52  |
Eclipse User |
|
|
|
The class org.eclipse.jface.databinding.viewers.ObservableValueEditing Support has a create method:
create(ColumnViewer viewer,
DataBindingContext dbc, final CellEditor cellEditor,
final IValueProperty cellEditorProperty,
final IValueProperty elementProperty)
seems like there should also be one:
create(ColumnViewer viewer,
DataBindingContext dbc, final CellEditor cellEditor,
final IValueProperty cellEditorProperty,
final IValueProperty elementProperty
UpdateValueStrategy targetToModel,
UpdateValueStrategy modelToTarget)
Is there a reason there isn't one?
the createBinding() call creates a generic targetToModel, with a null for modelToTarget. This lack of a way to specify your own strategies is causing me issues when using it with EMF, as I need to specify an EMFUpdateValueStrategy.
[Updated on: Tue, 30 March 2010 22:22] by Moderator
|
|
|
Re: [Databinding] Why isn't there an ObservableValueEditingSupport.create() that takes update strate [message #524773 is a reply to message #524138] |
Fri, 02 April 2010 08:46   |
Eclipse User |
|
|
|
Hi,
I also have a problem with this.
In Eclipse 3.4, it was possible to work around this by overriding the createBinding() method in ObservableValueEditingSupport. In the overridden implementation you could use your own context.bindValue(target, model, UpdateValueStrategy, UpdateValueStrategy) where you supply your custom UpdateValueStrategy. Unfortunately this no longer works with eclipse 3.5 - createBinding() is still a protected method but it refers to a default scoped boolean, 'dirty'. If you override createBinding, 'dirty' doesnt get modified by calls to your overridden method; subsequent calls to saveCellEditorValue() see 'dirty=false' and do nothing.
In short, it also seems to me that with 3.5, there is no longer a mechanism to set custom UpdateValueStrategies into ObservableValueEditingSupport. Is this correct?
cheers,
Neil
|
|
|
Re: [Databinding] Why isn't there an ObservableValueEditingSupport.create() that takes update strate [message #524812 is a reply to message #524773] |
Fri, 02 April 2010 12:14   |
Eclipse User |
|
|
|
Please file a bug!
Tom
Am 02.04.10 14:46, schrieb Neil Hanlon:
> Hi,
>
> I also have a problem with this.
> In Eclipse 3.4, it was possible to work around this by overriding the
> createBinding() method in ObservableValueEditingSupport. In the
> overridden implementation you could use your own
> context.bindValue(target, model, UpdateValueStrategy,
> UpdateValueStrategy) where you supply your custom UpdateValueStrategy.
> Unfortunately this no longer works with eclipse 3.5 - createBinding() is
> still a protected method but it refers to a default scoped boolean,
> 'dirty'. If you override createBinding, 'dirty' doesnt get modified by
> calls to your overridden method; subsequent calls to
> saveCellEditorValue() see 'dirty=false' and do nothing.
>
> In short, it also seems to me that with 3.5, there is no longer a
> mechanism to set custom UpdateValueStrategies into
> ObservableValueEditingSupport. Is this correct?
>
> cheers,
>
> Neil
|
|
|
|
Powered by
FUDForum. Page generated in 0.07453 seconds