Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » XWT Databinding(Widget Property and IObservableValue)
XWT Databinding [message #986982] Thu, 22 November 2012 17:03 Go to next message
Ahmed Hettab is currently offline Ahmed HettabFriend
Messages: 2
Registered: May 2012
Junior Member
I have an object of IObservableValue (org.eclipse.core.databinding.observable.value.IObservableValue) and I want to bind it with widgets Properties. (For example with text).Is there a way to do this in XWT. ?


Re: XWT Databinding [message #987010 is a reply to message #986982] Thu, 22 November 2012 20:24 Go to previous messageGo to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
One key idea behind XWT is that you don't have to deal with databinding explicitly.
Instead, you have your POJOs/Beans/... and bind their property with a UI widget using this expression: {Binding path=yourBeanProperty}

Do you have some demo code and/or xwt snippets that you tried?
Re: XWT Databinding [message #987015 is a reply to message #987010] Thu, 22 November 2012 21:32 Go to previous messageGo to next message
Ahmed Hettab is currently offline Ahmed HettabFriend
Messages: 2
Registered: May 2012
Junior Member
Thank you for the answer. I hope you understand my bad english

I have a collections of parameter (class with four fileds: name ==> string , initValue ==> Object, value ==> Object and categorie ==> String). the Parameter are provided by my application

usecase: The ability to bind the parameter value (parametername = "p") with Widget Property (p.value <===> Widget Property ) . if something happens to my widget, for example when changing the text or selection or background rate, the p.value will change. if the parameter (p.value) change the widget property change
Re: XWT Databinding [message #987081 is a reply to message #987015] Fri, 23 November 2012 11:15 Go to previous message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 854
Registered: July 2009
Senior Member
So, you have this class model:

class Application {
  List<Parameter> params;
}

class Parameter {
  String name;
  Object intValue;
  Object value;
  String categorie;
}


It is not clear what UI design you are targeting.
The simplest way is the master/detail pattern:
- A jface (Table)Viewer to show Parameter.name as label
- a Text widget to show/edit Parameter.value

Have a look at the Test cases of XWT.
Specifically, TableViewer_MasterDetail_Edit.xwt (see [1]) seems to be a good starting point for you.

Links:
[1] http://git.eclipse.org/c/e4/org.eclipse.e4.xwt.git/tree/tests/org.eclipse.e4.xwt.tests/src/org/eclipse/e4/xwt/tests/jface/tableviewer/master/detail/list/TableViewer_MasterDetail_Edit.xwt

Ahmed Hettab wrote on Thu, 22 November 2012 22:32
Thank you for the answer. I hope you understand my bad english

I have a collections of parameter (class with four fileds: name ==> string , initValue ==> Object, value ==> Object and categorie ==> String). the Parameter are provided by my application

usecase: The ability to bind the parameter value (parametername = "p") with Widget Property (p.value <===> Widget Property ) . if something happens to my widget, for example when changing the text or selection or background rate, the p.value will change. if the parameter (p.value) change the widget property change

Previous Topic:Active Selection in Child Context
Next Topic:IExtensionRegistry.addContribution() calls not working in E4?
Goto Forum:
  


Current Time: Fri Apr 19 11:32:36 GMT 2024

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

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

Back to the top