[Databinding] Why isn't there an ObservableValueEditingSupport.create() that takes update strategies [message #524138] |
Tue, 30 March 2010 21:52 |
Ryan Messages: 74 Registered: July 2009 Location: Indiana |
Member |
|
|
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: Wed, 31 March 2010 02:22] Report message to a 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 12:46 |
Neil Hanlon Messages: 1 Registered: April 2010 |
Junior Member |
|
|
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 16:14 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
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.03017 seconds