[DataBinding] DOM & XAML binding and bugs correction [message #325928] |
Mon, 03 March 2008 14:13 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Angelo ZERR![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=azerr%40redhat.com) Messages: 122 Registered: July 2009 |
Senior Member |
|
|
Hi,
I have starting to refactor TK-UI (see at http://tk-ui.sourceforge.net/)
API to manage binding between DOM (element, attribute...) and UI (Swing,
SWT) with JFace Databinding.
Just for information, TK-UI is API where you can describe your UI with XML
(XUL, XHTML, XForms...).
1. DOM & XAML binding
Today I can manage XHTML grammar where HTML element are bounded with UI
SWT or Swing with JFace Databinding (ex : <input type="text" value="bla
bla bla"> is rendered with SWT Text and SWT TextObservableValue is bounded
with AttrObservableValue (IObservableValue wich observe value of DOM
Attribute).
I have started too to manage binding with attribute expression like XAML :
Today I can manage this XHTML content :
<input id="MyTextBox" type="text" value="bla bla bla />
<input type="text" value="{Binding ElementName=MyTextBox, Path=value}" />
So the second input text is bounded with value attribute of the first
input.
Another sample is
<input type="checkbox" id="checkViewTextBox" checked="true" />
<input type="text" visible="{Binding ElementName=checkViewTextBox,
Path=checked}" />
When checkbox is checked, the input text is visible and false otherwise.
2. SWT JFace Databinding bugs/new features
I would like to say I have correct some bugs into SWT JFace Databinding
(see at
http://uface.googlecode.com/svn/trunk/org.ufacekit.ui.jface. databinding/)
:
ButtonObservableText => observe text of SWT Button.
ButtonObservableValue=> correction bug to initialise selectionValue filed into
ButtonObservableValue constructor.
ComboEditableObservableValue=> observe editable value of Combo (only
doGetValue works)
SliderObservableValue => observe slider value. See
org.ufacekit.ui.jface.databinding.example.properties.backgro und.BindBetweenSliderAndTextBackground
sample. There are 3 sliders (R, G, B) which manage background property of
SWT Text.
3. Bind events
I have created bind events project at
http://uface.googlecode.com/svn/trunk/org.ufacekit.ui.databi nding.events/
which extends DatabindingContext to manage binding between two kind of
event.
For instance with that, I can bind SWT event with DOM event. So I can bind
SWT MouseEvent with DOM MouseEvent. If you are interested by this toipc, I
could tell you more.
Regards Angelo
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04459 seconds