Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » how on earth do i bind comboVIewer to CellEditor?(grrrrr)
icon5.gif  how on earth do i bind comboVIewer to CellEditor? [message #667757] Mon, 02 May 2011 06:09 Go to next message
elhanan Maayan is currently offline elhanan MaayanFriend
Messages: 131
Registered: November 2009
Senior Member

i'm trying all sorts of ways to have a ComboViewer , send a particular property from a selected object to another property, the object recieving the property is a bean while the selected object is a pojo, but i cannot find a way to get them to work..

final ComboBoxViewerCellEditor cellEditor = new ComboBoxViewerCellEditor(tv.getTable(), SWT.READ_ONLY);
cellEditorProperty = CellEditorProperties.control().value(WidgetProperties.select ion());
valueProperty = BeanProperties.value(propName);
editingSupport = ObservableValueEditingSupport.create(tv, bindingContext, cellEditor, cellEditorProperty, valueProperty);
tvc.setEditingSupport(editingSupport);
Re: how on earth do i bind comboVIewer to CellEditor? [message #667760 is a reply to message #667757] Mon, 02 May 2011 06:53 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5467
Registered: July 2009
Senior Member
WidgetProperties.selection() looks wrong because when you want to
observe a viewer you'll have to use ViewerProperties but to me it looks
like as if CellEditorProperties does not support this.

Please file a feature request bugzilla.

Tom

Am 02.05.11 08:09, schrieb elhanan:
>
> i'm trying all sorts of ways to have a ComboViewer , send a particular
> property from a selected object to another property, the object
> recieving the property is a bean while the selected object is a pojo,
> but i cannot find a way to get them to work..
>
> final ComboBoxViewerCellEditor cellEditor = new
> ComboBoxViewerCellEditor(tv.getTable(), SWT.READ_ONLY);
> cellEditorProperty =
> CellEditorProperties.control().value(WidgetProperties.select ion());
> valueProperty = BeanProperties.value(propName);
> editingSupport = ObservableValueEditingSupport.create(tv,
> bindingContext, cellEditor, cellEditorProperty, valueProperty);
> tvc.setEditingSupport(editingSupport);
Re: how on earth do i bind comboVIewer to CellEditor? [message #667909 is a reply to message #667760] Mon, 02 May 2011 18:17 Go to previous messageGo to next message
elhanan Maayan is currently offline elhanan MaayanFriend
Messages: 131
Registered: November 2009
Senior Member
a FEATURE request ? don't you mean a bug??

otherwise what's the use of having ComboBoxViewerCellEditor class in the first place ? seriosly ,where can i find samples using it?
Re: how on earth do i bind comboVIewer to CellEditor? [message #667933 is a reply to message #667760] Mon, 02 May 2011 19:58 Go to previous message
elhanan Maayan is currently offline elhanan MaayanFriend
Messages: 131
Registered: November 2009
Senior Member
the closest that i could get was to do a:
PojoProperties.value("viewer" ).value(ViewerProperties.singleSelection().value(PojoPropert ies.value( "id")));

where id is the actuall value i wanna update in the model, but even though it does get updated, the selected object's property in the combo gets updated also! when i move rows.

there is something missing here.
Previous Topic:Finding a view from another perspective
Next Topic:TableViewer - How to force a table column / cell selection when the table widget is loaded
Goto Forum:
  


Current Time: Tue Nov 25 23:48:14 GMT 2014

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

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