Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 289359 - MasterDetailComposite: BindingProperty Controls don't get registered
Summary: MasterDetailComposite: BindingProperty Controls don't get registered
Status: RESOLVED FIXED
Alias: None
Product: Riena
Classification: RT
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 1.2.0.M2   Edit
Assignee: Elias Volanakis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-14 10:37 EDT by Steffen Kriese CLA
Modified: 2009-09-18 03:08 EDT (History)
0 users

See Also:


Attachments
Patch + TestCase + Update for SWT-ExampleClient (6.54 KB, patch)
2009-09-14 10:42 EDT, Steffen Kriese CLA
elias: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Kriese CLA 2009-09-14 10:37:25 EDT
UI-Controls with a valid BindingProperty that get created in the DetailsSection of a MasterDetailsComposite, won't be bound automatically like expected but rather have to be registered manually by calling addUIControl.
For Example this Code does not make the Ridgets available in the SubModuleController:

MasterDetailsComposite mdComposite = new MasterDetailsComposite(result, SWT.NONE, SWT.BOTTOM);
Composite details = mdComposite.getDetails();
details.setLayout(new GridLayout(2, false));

UIControlsFactory.createLabel(details, "First Name:"); 
Text txtFirst = UIControlsFactory.createText(details, SWT.BORDER, "first"); 
txtFirst.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

UIControlsFactory.createLabel(details, "Last Name:"); 
Text txtLast = UIControlsFactory.createText(details, SWT.BORDER, "last"); 
txtLast.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));

this.addUIControl(mdComposite, "master"); 

The UIControlsFactory creates a TextField and sets the bindingProperty on the Control, but if you call getRidget("first") in the associated SubModuleController it will result in a NullPointerException, because the Ridget is not available.
Comment 1 Steffen Kriese CLA 2009-09-14 10:42:52 EDT
Created attachment 147107 [details]
Patch + TestCase + Update for SWT-ExampleClient

Patch for MasterDetailsComposite to register Controls with given bindingProperty automatically instead of calling addUIControl for every Control.
Comment 2 Elias Volanakis CLA 2009-09-17 00:48:42 EDT
Note to myself: look also at #283827 and see how / if this relates...
Comment 3 Elias Volanakis CLA 2009-09-18 03:08:27 EDT
Thank Steffen - committed.