Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "JFace Data Binding/DOM"
(→Target) |
(→DOM binding sample) |
||
Line 11: | Line 11: | ||
== DOM binding sample == | == DOM binding sample == | ||
− | + | The [http://tk-ui.svn.sourceforge.net/svnroot/tk-ui/inbox/org.eclipse.core.examples.databinding.dom/src/org/eclipse/core/examples/databinding/dom/html/input/TestHTMLInputText.java TestHTMLInputText] DOM binding sample explains how bind this XHTML content : | |
<pre> | <pre> | ||
Line 28: | Line 28: | ||
[[Image:TestHTMLInputText.JPG]] | [[Image:TestHTMLInputText.JPG]] | ||
+ | |||
+ | This screen show the result of binding between the XHTMl DOM Document and SWT UI widgets. | ||
+ | |||
+ | <p> | ||
+ | This sample is DOM IObservableValue implementation. It bind: | ||
+ | <ul> | ||
+ | <li> CharacterData of DOM Element title with Text property of SWT Shell.</li> | ||
+ | <li> CharacterData of DOM Element label with Text property of SWT Label.</li> | ||
+ | <li> Attribute value of DOM Element input with Text property of SWT Text.</li> | ||
+ | <li> DOM Document content with Text property of SWT Text (Area).</li> | ||
+ | </ul> | ||
+ | |||
[[Category:Data Binding]] | [[Category:Data Binding]] |
Revision as of 18:31, 1 August 2008
JFace Data Binding |
Home |
How to Contribute |
FAQ |
Snippets |
Concepts |
Binding |
Converter |
Observable |
Realm |
Target
Work is underway to support binding to w3c DOM node. See (for the moment) TK-UI SVN - you can find two plug-in project that provides DOM-based observables :
- org.eclipse.core.databinding.dom : DOM binding source.
- org.eclipse.core.examples.databinding.dom : DOM binding samples.
DOM binding sample
The TestHTMLInputText DOM binding sample explains how bind this XHTML content :
<html> <title>DOM Bindings - HTML Input Text Sample.</title> <label>This sample bind : * CharacterData of DOM Element title with Text property of SWT Shell. * CharacterData of DOM Element label with Text property of SWT Label. * Attribute value of DOM Element input with Text property of SWT Text. * DOM Document content with Text property of SWT Text (Area).</label> <input type="text" value="bla bla bla" /> </html>
with several SWT UI widgets :
This screen show the result of binding between the XHTMl DOM Document and SWT UI widgets.
This sample is DOM IObservableValue implementation. It bind:
- CharacterData of DOM Element title with Text property of SWT Shell.
- CharacterData of DOM Element label with Text property of SWT Label.
- Attribute value of DOM Element input with Text property of SWT Text.
- DOM Document content with Text property of SWT Text (Area).