[Ridgets] Support for EMFDatabinding [message #21682] |
Tue, 17 February 2009 09:11  |
Eclipse User |
|
|
|
Hi,
Probably I'm doing something wrong, but I declare a binding as follow:
IObservableValue emfObs = EMFEditObservables.observeValue(editingDomain,
getModelObject(),
MyEMFPackage.Literals.MYOBJ__MYEATT);
myTextRidget.bindToModel(emfObs);
myTextRidget.updateFromModel();
but this does not work, The #updateFromModel is executed and the value
is rendered in the text-field, but a UI-to-Model Update does not work.
EMF has a separate DataBindingContext with different
UpdateValueStrategies. Is it possible to use a EMFDataBindingContext (I
want the use the capabilities EMF.Edit provides)? -
I didn't see any possibility to override or extend to provide my own
databinding-context.
Thx for your help
Tom
|
|
|
|
|
|
|
Re: [Ridgets] Support for EMFDatabinding [message #21995 is a reply to message #21682] |
Mon, 23 February 2009 23:31  |
Eclipse User |
|
|
|
Originally posted by: evolanakis.innoopract.com
Hi Tom,
- using your own DataBindingContext is not supported. Please file an
enhancement request so we can keep track of this.
http://www.eclipse.org/riena/bugs.php
- feel free to attach a standalone example (or projects) to that bug, so
we can experiment with your issue without spending lot of time with EMF.
- I know that other people on the newsgroup use EMF and Riena. Has this
been a problem, or how did you work around this?
Kind regards,
Elias.
Tom Seidel wrote:
> Hi,
>
> Probably I'm doing something wrong, but I declare a binding as follow:
>
> IObservableValue emfObs = EMFEditObservables.observeValue(editingDomain,
> getModelObject(),
> MyEMFPackage.Literals.MYOBJ__MYEATT);
> myTextRidget.bindToModel(emfObs);
> myTextRidget.updateFromModel();
>
> but this does not work, The #updateFromModel is executed and the value
> is rendered in the text-field, but a UI-to-Model Update does not work.
> EMF has a separate DataBindingContext with different
> UpdateValueStrategies. Is it possible to use a EMFDataBindingContext (I
> want the use the capabilities EMF.Edit provides)? -
> I didn't see any possibility to override or extend to provide my own
> databinding-context.
>
> Thx for your help
> Tom
--
---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
|
|
|
Re: [Ridgets] Support for EMFDatabinding [message #580683 is a reply to message #21682] |
Tue, 17 February 2009 09:26  |
Eclipse User |
|
|
|
Hi,
If you rely on the default converters you need to use an
EMFDatabindingContext because EMFObservables report the structural
feature as the value-type.
If Riena doesn't allows you to set it you can work around by explicitly
setting an converter but that's far from ideal :-)
Tom
Tom Seidel schrieb:
> Hi,
>
> Probably I'm doing something wrong, but I declare a binding as follow:
>
> IObservableValue emfObs = EMFEditObservables.observeValue(editingDomain,
> getModelObject(),
> MyEMFPackage.Literals.MYOBJ__MYEATT);
> myTextRidget.bindToModel(emfObs);
> myTextRidget.updateFromModel();
>
> but this does not work, The #updateFromModel is executed and the value
> is rendered in the text-field, but a UI-to-Model Update does not work.
> EMF has a separate DataBindingContext with different
> UpdateValueStrategies. Is it possible to use a EMFDataBindingContext (I
> want the use the capabilities EMF.Edit provides)? -
> I didn't see any possibility to override or extend to provide my own
> databinding-context.
>
> Thx for your help
> Tom
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
Re: [Ridgets] Support for EMFDatabinding [message #580702 is a reply to message #21727] |
Tue, 17 February 2009 09:30  |
Eclipse User |
|
|
|
Hi Tom,
> need to use an
> EMFDatabindingContext
that's exactly the problem. It seems to me I can not set this context.
Tom
Tom Schindl schrieb:
> Hi,
>
> If you rely on the default converters you need to use an
> EMFDatabindingContext because EMFObservables report the structural
> feature as the value-type.
>
> If Riena doesn't allows you to set it you can work around by explicitly
> setting an converter but that's far from ideal :-)
>
> Tom
>
> Tom Seidel schrieb:
>> Hi,
>>
>> Probably I'm doing something wrong, but I declare a binding as follow:
>>
>> IObservableValue emfObs = EMFEditObservables.observeValue(editingDomain,
>> getModelObject(),
>> MyEMFPackage.Literals.MYOBJ__MYEATT);
>> myTextRidget.bindToModel(emfObs);
>> myTextRidget.updateFromModel();
>>
>> but this does not work, The #updateFromModel is executed and the value
>> is rendered in the text-field, but a UI-to-Model Update does not work.
>> EMF has a separate DataBindingContext with different
>> UpdateValueStrategies. Is it possible to use a EMFDataBindingContext (I
>> want the use the capabilities EMF.Edit provides)? -
>> I didn't see any possibility to override or extend to provide my own
>> databinding-context.
>>
>> Thx for your help
>> Tom
>
>
|
|
|
Re: [Ridgets] Support for EMFDatabinding [message #580727 is a reply to message #21772] |
Tue, 17 February 2009 10:04  |
Eclipse User |
|
|
|
Tom Seidel schrieb:
> Hi Tom,
>
>> need to use an
>> EMFDatabindingContext
>
> that's exactly the problem. It seems to me I can not set this context.
>
This is one of the rare cases the DB creators failed a bit because the
Databinding-Context is not the appropriate location for this. It would
be better if I one could plug-in his/her own converters.
Something like:
------------8<------------
DatabindingContext dbc = ... ;
dbc.setConverterStrategy(....);
dbc.setValidatorStrategy(....);
------------8<------------
There's a bug with a discussion about this problem and possible solution
but this won't get fixed in time of 3.5.
Tom
--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
|
|
|
Re: [Ridgets] Support for EMFDatabinding [message #580798 is a reply to message #21815] |
Sun, 22 February 2009 07:56  |
Eclipse User |
|
|
|
Maybe. But I'm wondering if this "failure" can't be workarounded by
Riena itself with providing some API for using my own DatabindingContext.
Any thoughts?
Tom Schindl schrieb:
> Tom Seidel schrieb:
>> Hi Tom,
>>
>>> need to use an
>>> EMFDatabindingContext
>> that's exactly the problem. It seems to me I can not set this context.
>>
>
> This is one of the rare cases the DB creators failed a bit because the
> Databinding-Context is not the appropriate location for this. It would
> be better if I one could plug-in his/her own converters.
>
> Something like:
>
> ------------8<------------
> DatabindingContext dbc = ... ;
> dbc.setConverterStrategy(....);
> dbc.setValidatorStrategy(....);
> ------------8<------------
>
> There's a bug with a discussion about this problem and possible solution
> but this won't get fixed in time of 3.5.
>
> Tom
>
|
|
|
Re: [Ridgets] Support for EMFDatabinding [message #580820 is a reply to message #21682] |
Mon, 23 February 2009 23:31  |
Eclipse User |
|
|
|
Hi Tom,
- using your own DataBindingContext is not supported. Please file an
enhancement request so we can keep track of this.
http://www.eclipse.org/riena/bugs.php
- feel free to attach a standalone example (or projects) to that bug, so
we can experiment with your issue without spending lot of time with EMF.
- I know that other people on the newsgroup use EMF and Riena. Has this
been a problem, or how did you work around this?
Kind regards,
Elias.
Tom Seidel wrote:
> Hi,
>
> Probably I'm doing something wrong, but I declare a binding as follow:
>
> IObservableValue emfObs = EMFEditObservables.observeValue(editingDomain,
> getModelObject(),
> MyEMFPackage.Literals.MYOBJ__MYEATT);
> myTextRidget.bindToModel(emfObs);
> myTextRidget.updateFromModel();
>
> but this does not work, The #updateFromModel is executed and the value
> is rendered in the text-field, but a UI-to-Model Update does not work.
> EMF has a separate DataBindingContext with different
> UpdateValueStrategies. Is it possible to use a EMFDataBindingContext (I
> want the use the capabilities EMF.Edit provides)? -
> I didn't see any possibility to override or extend to provide my own
> databinding-context.
>
> Thx for your help
> Tom
--
---
Elias Volanakis
Innoopract, Inc.
http://www.innoopract.com
|
|
|
Powered by
FUDForum. Page generated in 1.06550 seconds