Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Databinding on RadioGroupViewer sets 'null'
Databinding on RadioGroupViewer sets 'null' [message #668655] Fri, 06 May 2011 15:17
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi guys,

I've 2 problems with databinding on RadioGroupViewer. Assume the code below:
RadioGroupViewer radioGroupViewer = new RadioGroupViewer(groupOstatni, SWT.VERTICAL | SWT.LEFT_TO_RIGHT);
radioGroupViewer.setContentProvider(new ArrayContentProvider());

DataBindingContext context = new DataBindingContext()
        		new UpdateValueStrategy(UpdateValueStrategy.POLICY_UPDATE),
        		new UpdateValueStrategy(UpdateValueStrategy.POLICY_UPDATE));

modelObject.addPropertyChangeListener(new PropertyChangeListener() {

		public void propertyChange(PropertyChangeEvent evt) {
			if (evt.getPropertyName().equals("property")) {

When I change the selection from A (the initial property value) to B, the PropertyChangeListener is called twice. It writes:

That's not what I expected. Why isn't the listener called only ones with oldValue A and the newValue B? I'm I missing something?
The second problem is that when the RadioGroupViewer is disposed, it sets all the radio buttons labels to same and the property to null! I really don't understand why this is happening.
Previous Topic:Xviewer Column Grouping
Next Topic:CDateTime status?
Goto Forum:

Current Time: Wed Jun 20 16:58:38 GMT 2018

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

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

Back to the top