Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Re: [eclipse-dev] Re: [DataBinding] DOM and Rhino JFace Databinding implementation.

Hi Boris,

Thank you very much for you answer.
At first I have updated JFace Databinding Wiki to add JFace DOM binding.
 and I explain a litlle my DOM bindings project.

The first section target give you SVN URL to get the two DOM bindings project. Boris, if you can get it, I could send you into your email?
This section show screenshot like your sample TestMasterDetail. I have done the same thing than you (you use SimpleModel.java)
but with XML DOM Document. More you have textarea on the rigt which is bounded with DOM Document and you can type into it to update attribute, add node (But this feature is not very good developped).

So this sample show, that DOM Document is totally bouned with UI and you can manage master detail.


> I think what you are working on is very interesting, and I am glad that the data binding framework can be used in this context.
I will very glad if my work please JFace Team.


> However, I am not sure what your goals are. 
Ok, I explain you the goal of my work. I'm Akrogen developer. Akrogen is Plugin Eclipse to generate code where you can describe your Wizard with XUL markup, manage logic with _javascript_ and link it to template (Freemarker, Velocity, XSL...) or ANT Task to generate any code. I wand improve Akrogen a,d I would like describe wizard, dialog...with any XML markup (XHTML, XForms, XUL...), manage CSS and Databinding (like XAML _expression_) an drender it into SWT or Swing.

So I have created TK-UI project to manage thoses features. Into TK-Ui XML markup is loaded into DOM Document and you can access to the UI with DOM method like getElementById.
So if you write this HTML :

<input type="text" value="bla bla bla" />

The input element is linked to SWT Text and attribute value is bounded with Text property of SWT Text. To manage that I use  my DOM JFace implementation.  TK-UI manage too  DBEL (Databinding _expression_ Language) like this

<script>
fuction Person(name) {
   this.name = name;
}
var jsPerson = new Person('My Name');
</script>

<input value="{Binding Source=jsPerson Path=name}" />

So the SWT Text will display My Name, and if you update SWT Text, jsPerson will be updated too.
I'm using my own Rhino JFace implementation to manage that (Perhaps will be you interested too?).

I have too managed Event bindings to bind DOM event with SWT event.
So after you can write this code :

Element input = ...
input.addEventListener('focus'
, new EventListener(...)

So DOM focus is bounded with SWT FocusIn (Perhaps will be you interested too?).


> Did you just want to get some feedback on what you have been working on?
I tried to do that with Wiki and my mail, but don't hesitate to contact me if you want more information.


>Or would you like to know if it could become part of an Eclipse project?  If the latter, we could work towards creating a new component in >the Eclipse Platform Incubator with you (and others who are interested in this as well) as initial committers, similar to how this is done in >the Modeling project [1].  What do you think?

I will be very glad to become Eclipse commiter. If it's possible, I would like give my contribution.

But I think you should be see my work before (I have not finished to comment some code, I will do).
I hope DOM sample will please you.

If you want that I send you project, tell me.

Regards Angelo


Back to the top