Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Linking Databinding Validation with WizardPage [WizardPageSupport]
Linking Databinding Validation with WizardPage [WizardPageSupport] [message #527437] Thu, 15 April 2010 09:04 Go to next message
Kris Missing name is currently offline Kris Missing nameFriend
Messages: 47
Registered: July 2009
Member
Hi there!

I am trying to figure out how to use Databinding within wizardpages of
jface wizards. I found the snippet Snppet014WizardDialog in the
databinding example snippets
(http://wiki.eclipse.org/JFace_Data_Binding/Snippets).

Unfortunately, I don't get it how to adjust the snippet that it also
validates for empty input, so that the next and finish buttons are
disabled right from the start when the wizard pops up and no value has
been provided by the user yet.

Any hints?

Thanks
Kris
Re: Linking Databinding Validation with WizardPage [WizardPageSupport] [message #532521 is a reply to message #527437] Mon, 10 May 2010 11:32 Go to previous message
budili Missing name is currently offline budili Missing nameFriend
Messages: 64
Registered: May 2010
Member
change ValidationStatus.info in ValidationStatus.error:

private final class SingleDigitValidator implements IValidator
        {
            public IStatus validate(Object value)
            {
                Integer i = (Integer) value;
                if (i == null)
                {
                    return ValidationStatus.error("Please enter a value.");
                }
                if (i.intValue() < 0 || i.intValue() > 9)
                {
                    return ValidationStatus.error("Value must be between 0 and 9.");
                }
                return ValidationStatus.ok();
            }
        }


please read the tutorials and faqs about the DataBinding Framework !!

[Updated on: Mon, 10 May 2010 16:27]

Report message to a moderator

Previous Topic:Extend ElementListSeletionDialog
Next Topic:Eclipse 3.2 Databinding -> Realm is null
Goto Forum:
  


Current Time: Fri Apr 26 16:55:03 GMT 2024

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

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

Back to the top