Skip to main content



      Home
Home » Eclipse Projects » JFace » [DataBinding] TitleAreaDialogSupport not working properly?(Error message is shown at time of creation, default dialog message not shown if no error is found)
icon4.gif  [DataBinding] TitleAreaDialogSupport not working properly? [message #841393] Wed, 11 April 2012 04:39
Eclipse UserFriend
According to the javadoc of TitleAreaDialogSupport.create(TitleAreaDialog, DataBindingContext), the error message will not be shown at the time of creation, but the outcome is just opposite. Another issue is that if no error is found, the dialog message would be blank. My code is roughly as below:

DataBindingContext ctx = new DataBindingContext();
IObservableValue uiOv = null, modelOv = null;
Binding binding = null;

uiOv = WidgetProperties.selection().observe(aCombo);
modelOv = PojoProperties.value("aProperty").observe(mdoel);
binding = ctx.bindValue(uiOv, modelOv, new UpdateValueStrategy()
	.setBeforeSetValidator(new IValidator() {
		@Override
		public IStatus validate(Object value) {
			if (value == null || "".equals(value))
				return ValidationStatus.info(infoMessage);
			return ValidationStatus.ok();
		}
	}), null);
ControlDecorationSupport.create(binding, SWT.TOP | SWT.LEFT);

// the rest of the binding boilerplate code is ommitted.

TitleAreaDialogSupport.create(this, ctx);

[Updated on: Wed, 11 April 2012 09:47] by Moderator

Previous Topic:Databinding without model
Next Topic:[DataBinding] Bind Control.enabled to viewer selection if instanceof of type XY
Goto Forum:
  


Current Time: Sun Jul 13 18:01:47 EDT 2025

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

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

Back to the top