Skip to main content



      Home
Home » Eclipse Projects » JFace » TableViewer, DataBindingContext and UpdateValueStrategy
TableViewer, DataBindingContext and UpdateValueStrategy [message #816075] Thu, 08 March 2012 06:52 Go to next message
Eclipse UserFriend
Hi,

is there a possibility to perfom databinding on a table by using the DatabindingContext and UpdateValueStrategy?

The following points would be useful also on the table/table contents
1. Restrict updates on a table (UpdateValueStrategy.POLICY_ON_REQUEST)
2. Use converters
3. Use validators (for editing)

With ViewerSupport, I could bind my emf object to the table. However, I cannot find a way of using a (EMF)DataBindingContext like I already did with other controls.

Thanks for any help!

Regards,
Agnes
Re: TableViewer, DataBindingContext and UpdateValueStrategy [message #830422 is a reply to message #816075] Tue, 27 March 2012 11:52 Go to previous message
Eclipse UserFriend
Agnes Thanbichler wrote on Thu, 08 March 2012 12:52
Hi,

is there a possibility to perfom databinding on a table by using the DatabindingContext and UpdateValueStrategy?

The following points would be useful also on the table/table contents
1. Restrict updates on a table (UpdateValueStrategy.POLICY_ON_REQUEST)
2. Use converters
3. Use validators (for editing)

With ViewerSupport, I could bind my emf object to the table. However, I cannot find a way of using a (EMF)DataBindingContext like I already did with other controls.

Thanks for any help!

Regards,
Agnes


Hi,
you can use the TableViewer for your tables. Then you have ObservableListContentProvider and ObservableMapLabelProvider.

For this you need no DataBindingContext. As input for the table you usually set an IObservableList/IObservableSet.

For point 1 you can bind you model to a WritableList using DataBindingContext#bindList using an UpdateListStrategy. You can set a converter to the UpdateListStrategy.
If you need a validator you have to use master details binding, because you want to edit a certain field in your list of objects. There is an ObservableValueEditingSupport to bring databinding into an editable table viewer.


Look at the snippets at the link below for master details binding and viewers binding with editing support.
http://wiki.eclipse.org/JFace_Data_Binding/Snippets

Regards,
Mark
Previous Topic:Any pitfalls when using a TreeViewer to show a Table?
Next Topic:Cell vertical block selection in Table/Tree Viewer
Goto Forum:
  


Current Time: Tue Jul 22 18:03:46 EDT 2025

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

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

Back to the top