Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Data binding with validation and empty WritableValue
Data binding with validation and empty WritableValue [message #1064044] Mon, 17 June 2013 11:48
Istvan Meszaros is currently offline Istvan MeszarosFriend
Messages: 46
Registered: October 2009
Member
Hello all,

i have an SWT form with fields data-bound to the properties of a WritableValue object. The data binding configuration is done when the form is constructed, but initially the fields are disabled and the WritableValue contains null.

Later when the user selects an entity from some list, the corresponding model entity gets set to the WritableValue and the form fields are all get enabled.

The problem is that the validators involved in the data binding process are fired even when the WritableValue contains no model (just null), so when the form is initially disabled, i have fields marked as "invalid".

I would like to avoid validating fields when no model is assigned to the WritableValue. Furthermore, if one is done editing the model and set the WritableValue to null, the fields should be marked as "valid" and all set to disabled again.

How could it be done? Any pointers would be great!

Thanks.
Previous Topic:XML databinding in SWT help
Next Topic:[databinding] Using TreeViewer with ViewerSupport.bind(...)
Goto Forum:
  


Current Time: Mon Dec 22 02:52:36 GMT 2014

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

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