Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 21:52 Go to next message
Ryan is currently offline RyanFriend
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 Go to previous messageGo to next message
Neil Hanlon is currently offline Neil HanlonFriend
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 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
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
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 20:12 Go to previous message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
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: Tue Apr 23 17:30:50 GMT 2024

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

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

Back to the top