Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » ComboViewer Data Bind
ComboViewer Data Bind [message #662619] Thu, 31 March 2011 10:16
Rui Domingues is currently offline Rui Domingues
Messages: 191
Registered: October 2010
Senior Member
Hi,

I maintain EntidadeDTO objects in a List, where EntidadeDTO is defined as:
{String uuid, String name, String description, int x}

I have defined a combo viewer to show this List:
ComboViewer orgPrincipalViewer = new ComboViewer(this.organicaPrincipal);
orgPrincipalViewer.setContentProvider(new ArrayContentProvider());
ILabelProvider labelProvider = new LabelProvider()
{
@Override
public String getText( Object element ){
EntidadeDTO entidade = (EntidadeRoleDTO) element;
return entidade.getDescricao();
}
};
orgPrincipalViewer.setLabelProvider( labelProvider );


Now I want to bind the selected item in Combo with a proprety EntidadeDTO typed, and I've tried:
bindingContext.bindValue(ViewersObservables.observeSingleSelection(orgPrincipalViewer), 
				BeansObservables.observeValue(processo, "rolePrincipal"), null,null);


The bindig from Model to Combo is working, but when I select an Item in Combo, the model is not updated?

Can anyone tell me why?

Thanks











Previous Topic:TableViewer getTable method problem
Next Topic:How do I create a truly "flat" toggle button on a tool bar?
Goto Forum:
  


Current Time: Tue Sep 23 18:28:33 GMT 2014

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

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