Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Databinding - DirtyState of an BindingContext
Databinding - DirtyState of an BindingContext [message #332486] Wed, 22 October 2008 15:03 Go to next message
Andreas Schmid is currently offline Andreas SchmidFriend
Messages: 17
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Boris Bokowski is currently offline Boris BokowskiFriend
Messages: 272
Registered: July 2009
Senior Member
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 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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">&lt;aschmid@vetinf.de&gt;</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--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Databinding - DirtyState of an BindingContext [message #332493 is a reply to message #332489] Thu, 23 October 2008 06:31 Go to previous messageGo to next message
Andreas Schmid is currently offline Andreas SchmidFriend
Messages: 17
Registered: July 2009
Junior Member
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 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
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
>>>
>>>
>>>
Previous Topic:Re: Error launching the preference page
Next Topic:org.eclipse.ui.views.markers.internal.TableView
Goto Forum:
  


Current Time: Fri Apr 26 23:32:03 GMT 2024

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

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

Back to the top