Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » [Databinding] No validation after Wizard/Dialog shows up the first time
[Databinding] No validation after Wizard/Dialog shows up the first time [message #19800] Thu, 09 July 2009 16:32 Go to next message
Philipp Kursawe is currently offline Philipp Kursawe
Messages: 135
Registered: July 2009
Senior Member
Hello,

I have my validation setup on the controls of a wizard and the
validation kicks already in when the wizard is opened the first time. I
would rather have the controls would validate only *after* the user
started to type anything in them. Before I would like to have the
controls decorated with a "Input required" decoration and only if the
entered input is not validating (on each control separately) the wizard
should display the error messages.

Any ideas how to setup databinding to support such behaviour?

Thanks,
Phil
Re: [Databinding] No validation after Wizard/Dialog shows up the first time [message #19843 is a reply to message #19800] Thu, 09 July 2009 19:49 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew Hall
Messages: 368
Registered: July 2009
Senior Member
Try putting off calling WizardPageSupport.create(bindingContext, this)
until _after_ creating all all your bindings, and see if that does what
you want.

Matthew

Philipp Kursawe wrote:
> Hello,
>
> I have my validation setup on the controls of a wizard and the
> validation kicks already in when the wizard is opened the first time. I
> would rather have the controls would validate only *after* the user
> started to type anything in them. Before I would like to have the
> controls decorated with a "Input required" decoration and only if the
> entered input is not validating (on each control separately) the wizard
> should display the error messages.
>
> Any ideas how to setup databinding to support such behaviour?
>
> Thanks,
> Phil
Re: [Databinding] No validation after Wizard/Dialog shows up the first time [message #19904 is a reply to message #19843] Thu, 09 July 2009 22:02 Go to previous message
Philipp Kursawe is currently offline Philipp Kursawe
Messages: 135
Registered: July 2009
Senior Member
Matthew Hall wrote:
> Try putting off calling WizardPageSupport.create(bindingContext, this)
> until _after_ creating all all your bindings, and see if that does what
> you want.
>
Thanks Matthew for your answer. Unfortunatly that is not what I am
looking for.
I enable the finish/next button myself. What I am looking for is a way
for the
databinding to validate before the user actually made any changes in the
control. So when the Wizard/Dialog or wherevever the databinding is
created, is activated, the models writes its values into the target.
This lead the target to validate the input it got (from the model) and
treating it like it was user entered data. If the model did not contain
any data, the databinding context thinks the user entered invalid data.
But the user has not even started to enter data.
I tried to bind with SWT.FocusOut but without luck, the validation kicks
in anyway before the control is even focused.

>
> Philipp Kursawe wrote:
>> Hello,
>>
>> I have my validation setup on the controls of a wizard and the
>> validation kicks already in when the wizard is opened the first time.
>> I would rather have the controls would validate only *after* the user
>> started to type anything in them. Before I would like to have the
>> controls decorated with a "Input required" decoration and only if the
>> entered input is not validating (on each control separately) the
>> wizard should display the error messages.
>>
>> Any ideas how to setup databinding to support such behaviour?
>>
>> Thanks,
>> Phil
Previous Topic:[Databinding]
Next Topic:Default menu item from a menu manager
Goto Forum:
  


Current Time: Sat Sep 20 10:17:48 GMT 2014

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

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