Databinding text to model [message #486173] |
Wed, 16 September 2009 15:27 |
Eclipse User |
|
|
|
Originally posted by: mirko.bernardoni.gmail.com
Hi,
I have converted a rcp application from eclipse 3.4 to eclipse 3.5.
In my application I bind some text widget to model object. My model's
object aren't of type String.
When the class ValueBinding set the converted value to text widget, I have
an Exception.
The reason is class WidgetStringValueProperty, method:
protected void doSetValue(Object source, Object value) {
doSetStringValue(source, (String) value);
}
It's possibile to change to
protected void doSetValue(Object source, Object value) {
doSetStringValue(source, value == null ? "": value.toString());
}
Or exists another solution?
|
|
|
|
Re: Databinding text to model [message #486318 is a reply to message #486196] |
Thu, 17 September 2009 08:58 |
Eclipse User |
|
|
|
Originally posted by: mirko.bernardoni.gmail.com
Matthew Hall wrote:
> Mirko B. wrote:
>> Hi,
>> I have converted a rcp application from eclipse 3.4 to eclipse 3.5.
>> In my application I bind some text widget to model object. My model's
>> object aren't of type String.
>> When the class ValueBinding set the converted value to text widget, I
>> have an Exception.
> Are you setting an explicit converter? Typically UpdateValueStrategy
> will provide an object-to-string converter automatically for you if you
> do not set a converter yourself.
Yes, I have setting an explicit converter.
>> protected void doSetValue(Object source, Object value) {
>> doSetStringValue(source, value == null ? "": value.toString());
>> }
> Would you file a bug for this?
>
https://bugs.eclipse.org/bugs/enter_bug.cgi?classification=E clipse&product=Platform&component=UI&short_desc=[DataBinding]&version=3.6
I have submit a bug for this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289700
Best regards,
Mirko B.
> Matthew
|
|
|
|
Powered by
FUDForum. Page generated in 0.03391 seconds