Skip to main content



      Home
Home » Eclipse Projects » JFace » [Databinding] Why isn't there an ObservableValueEditingSupport.create() that takes update strategies
icon5.gif  [Databinding] Why isn't there an ObservableValueEditingSupport.create() that takes update strategies [message #524138] Tue, 30 March 2010 17:52 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: [Databinding] Why isn't there an ObservableValueEditingSupport.create() that takes update strate [message #524835 is a reply to message #524138] Fri, 02 April 2010 16:12 Go to previous message
Eclipse UserFriend
Done.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=308010
Previous Topic:Spreadsheet-like table viewer
Next Topic:Question about TextCellEditor's text control
Goto Forum:
  


Current Time: Sat Jul 26 03:52:27 EDT 2025

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

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

Back to the top