Difference between revisions of "JFace Data Binding/Rhino"

From Eclipsepedia

Jump to: navigation, search
m (RhinoObservables)
m (Use-case)
Line 8: Line 8:
  
 
<pre>
 
<pre>
 
 
function Person(name) {
 
function Person(name) {
 
   this.name = name
 
   this.name = name
Line 14: Line 13:
  
 
var person = new Person('Simon')
 
var person = new Person('Simon')
 
 
</pre>
 
</pre>
  

Revision as of 09:50, 18 March 2009

Contents

Target

The goal of JFace Data Binding/Rhino is to support bindings to Rhino Javascript Scriptable Object. See (for the moment) TK-UI SVN but we are discussing with the Eclipse Team on where it can be made available.

Use-case

Take a simple example. Imagine you have this script :

function Person(name) {
  this.name = name
};

var person = new Person('Simon')

And you wish bind the property 'name' of the scriptable object person with SWT Text.

Jface-db-rhino-person.png

On load form page, SWT Text has 'Simon' value. When user type 'Boris' into SWT Text, it update property 'name' of the scriptable object person with 'Boris' value.

RhinoObservables

Like another JFace Databinding implementations (SWT, Beans, Pojo...), Rhino bindings project give you several JFace IObservableValue and IObservableList Rhino implementations accessible via the IObservable factory org.eclipse.core.databinding.rhino.RhinoObservables.

Why JFace Rhino Databinding?

E4 project

XWT