Community
Participate
Working Groups
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.
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.
Note to myself: look also at #283827 and see how / if this relates...
Thank Steffen - committed.