Home » Eclipse Projects » Eclipse Platform » Databinding - DirtyState of an BindingContext
Databinding - DirtyState of an BindingContext [message #332486] |
Wed, 22 October 2008 15:03  |
Eclipse User |
|
|
|
Hello,
I just try to develop an editor based on JFace-Databinding. For this I
need to know if an Binding is dirty or not (DirtyState), to save my
Editor, if changes are detected.
But I do not know where to get this(DirtyState) information.
I found a Bug (ID 119791). Is there a workaround on that or is ist still
not working ?
Maybe Andrey Tarantsov can tell me more about it ?
Thanks
Andreas
|
|
|
Re: Databinding - DirtyState of an BindingContext [message #332488 is a reply to message #332486] |
Wed, 22 October 2008 17:37   |
Eclipse User |
|
|
|
My guess would be that you need something outside of the data binding
framework (think about Undo/Redo) but for now, if you would like to know if
there have been any changes in the UI at all, you could have a look at the
logic in WizardPageSupport and how it hooks generic change listeners on all
target observables in a data binding context.
As for the bug, it hasn't been updated (with technical discussion) in over a
year, so I wouldn't hold my breath.
Boris
"Andreas Schmid" <aschmid@vetinf.de> wrote in message
news:gdnfck$2on$1@build.eclipse.org...
> Hello,
>
> I just try to develop an editor based on JFace-Databinding. For this I
> need to know if an Binding is dirty or not (DirtyState), to save my
> Editor, if changes are detected.
>
> But I do not know where to get this(DirtyState) information.
>
> I found a Bug (ID 119791). Is there a workaround on that or is ist still
> not working ?
>
> Maybe Andrey Tarantsov can tell me more about it ?
>
>
> Thanks
>
> Andreas
|
|
|
Re: Databinding - DirtyState of an BindingContext [message #332489 is a reply to message #332488] |
Wed, 22 October 2008 18:03   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------010007060507010300040004
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Boris,
Of course if he were using EMF's data binding integration that you
mostly wrote, the updates would use EMF.Edit's command stack and not
only would that provide dirty state tracking, but it would also support
undo...
Boris Bokowski wrote:
> My guess would be that you need something outside of the data binding
> framework (think about Undo/Redo) but for now, if you would like to know if
> there have been any changes in the UI at all, you could have a look at the
> logic in WizardPageSupport and how it hooks generic change listeners on all
> target observables in a data binding context.
>
> As for the bug, it hasn't been updated (with technical discussion) in over a
> year, so I wouldn't hold my breath.
>
> Boris
>
> "Andreas Schmid" <aschmid@vetinf.de> wrote in message
> news:gdnfck$2on$1@build.eclipse.org...
>
>> Hello,
>>
>> I just try to develop an editor based on JFace-Databinding. For this I
>> need to know if an Binding is dirty or not (DirtyState), to save my
>> Editor, if changes are detected.
>>
>> But I do not know where to get this(DirtyState) information.
>>
>> I found a Bug (ID 119791). Is there a workaround on that or is ist still
>> not working ?
>>
>> Maybe Andrey Tarantsov can tell me more about it ?
>>
>>
>> Thanks
>>
>> Andreas
>>
>
>
>
--------------010007060507010300040004
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Boris,<br>
<br>
Of course if he were using EMF's data binding integration that you
mostly wrote, the updates would use EMF.Edit's command stack and not
only would that provide dirty state tracking, but it would also support
undo...<br>
<br>
<br>
Boris Bokowski wrote:
<blockquote cite="mid:gdnod4$7u6$1@build.eclipse.org" type="cite">
<pre wrap="">My guess would be that you need something outside of the data binding
framework (think about Undo/Redo) but for now, if you would like to know if
there have been any changes in the UI at all, you could have a look at the
logic in WizardPageSupport and how it hooks generic change listeners on all
target observables in a data binding context.
As for the bug, it hasn't been updated (with technical discussion) in over a
year, so I wouldn't hold my breath.
Boris
"Andreas Schmid" <a class="moz-txt-link-rfc2396E" href="mailto:aschmid@vetinf.de"><aschmid@vetinf.de></a> wrote in message
<a class="moz-txt-link-freetext" href="news:gdnfck$2on$1@build.eclipse.org">news:gdnfck$2on$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Hello,
I just try to develop an editor based on JFace-Databinding. For this I
need to know if an Binding is dirty or not (DirtyState), to save my
Editor, if changes are detected.
But I do not know where to get this(DirtyState) information.
I found a Bug (ID 119791). Is there a workaround on that or is ist still
not working ?
Maybe Andrey Tarantsov can tell me more about it ?
Thanks
Andreas
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>
--------------010007060507010300040004--
|
|
|
Re: Databinding - DirtyState of an BindingContext [message #332493 is a reply to message #332489] |
Thu, 23 October 2008 06:31   |
Eclipse User |
|
|
|
At current, we have registered a Convertor in our UpdatePolicy, to
convert a String , given in a TextBox, to an Boolean ("true" => true,
everything else => false) and vice versa.
But the Observers only provide the "real" value, which means the
unconverted String from the textbox. The Binding, the binding context
nor the events provide the converted value. Is there any other place to
look for the converted value, during an ValueChanged or an ListChanged
event ?
Andreas
Ed Merks schrieb:
> Boris,
>
> Of course if he were using EMF's data binding integration that you
> mostly wrote, the updates would use EMF.Edit's command stack and not
> only would that provide dirty state tracking, but it would also support
> undo...
>
>
> Boris Bokowski wrote:
>> My guess would be that you need something outside of the data binding
>> framework (think about Undo/Redo) but for now, if you would like to know if
>> there have been any changes in the UI at all, you could have a look at the
>> logic in WizardPageSupport and how it hooks generic change listeners on all
>> target observables in a data binding context.
>>
>> As for the bug, it hasn't been updated (with technical discussion) in over a
>> year, so I wouldn't hold my breath.
>>
>> Boris
>>
>> "Andreas Schmid" <aschmid@vetinf.de> wrote in message
>> news:gdnfck$2on$1@build.eclipse.org...
>>
>>> Hello,
>>>
>>> I just try to develop an editor based on JFace-Databinding. For this I
>>> need to know if an Binding is dirty or not (DirtyState), to save my
>>> Editor, if changes are detected.
>>>
>>> But I do not know where to get this(DirtyState) information.
>>>
>>> I found a Bug (ID 119791). Is there a workaround on that or is ist still
>>> not working ?
>>>
>>> Maybe Andrey Tarantsov can tell me more about it ?
>>>
>>>
>>> Thanks
>>>
>>> Andreas
>>>
>>
>>
>>
|
|
|
Re: Databinding - DirtyState of an BindingContext [message #332499 is a reply to message #332493] |
Thu, 23 October 2008 15:25  |
Eclipse User |
|
|
|
When I want easy access to the converted value, I usually chain two
bindings, with a shared observable in the middle:
Text text = ...
IObservableValue target = SWTObservables.observeText(text, SWT.Modify);
IObservableValue convertedTarget = new WritableValue();
Bean bean = ...
IObservableValue value = BeansObservables.observeValue(bean, "value");
dbc.bindValue(convertedTarget, value, null, null);
dbc.bindValue(target, convertedTarget, targetToModelStrategy,
modelToTargetStrategy);
Matthew
Andreas Schmid wrote:
> At current, we have registered a Convertor in our UpdatePolicy, to
> convert a String , given in a TextBox, to an Boolean ("true" => true,
> everything else => false) and vice versa.
>
> But the Observers only provide the "real" value, which means the
> unconverted String from the textbox. The Binding, the binding context
> nor the events provide the converted value. Is there any other place to
> look for the converted value, during an ValueChanged or an ListChanged
> event ?
>
> Andreas
>
>
> Ed Merks schrieb:
>> Boris,
>>
>> Of course if he were using EMF's data binding integration that you
>> mostly wrote, the updates would use EMF.Edit's command stack and not
>> only would that provide dirty state tracking, but it would also
>> support undo...
>>
>>
>> Boris Bokowski wrote:
>>> My guess would be that you need something outside of the data binding
>>> framework (think about Undo/Redo) but for now, if you would like to
>>> know if there have been any changes in the UI at all, you could have
>>> a look at the logic in WizardPageSupport and how it hooks generic
>>> change listeners on all target observables in a data binding context.
>>>
>>> As for the bug, it hasn't been updated (with technical discussion) in
>>> over a year, so I wouldn't hold my breath.
>>>
>>> Boris
>>>
>>> "Andreas Schmid" <aschmid@vetinf.de> wrote in message
>>> news:gdnfck$2on$1@build.eclipse.org...
>>>
>>>> Hello,
>>>>
>>>> I just try to develop an editor based on JFace-Databinding. For this
>>>> I need to know if an Binding is dirty or not (DirtyState), to save
>>>> my Editor, if changes are detected.
>>>>
>>>> But I do not know where to get this(DirtyState) information.
>>>>
>>>> I found a Bug (ID 119791). Is there a workaround on that or is ist
>>>> still not working ?
>>>>
>>>> Maybe Andrey Tarantsov can tell me more about it ?
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Andreas
>>>
>>>
>>>
|
|
|
Goto Forum:
Current Time: Mon Feb 10 20:53:01 GMT 2025
Powered by FUDForum. Page generated in 0.03136 seconds
|