Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Wizard prevent next step
Wizard prevent next step [message #991811] Thu, 20 December 2012 08:55 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
Hi,

I have a wizard with multiple steps (every step with its own form). I want the user only to be able to go to the next step if he has filled in a particular field on a form. How to do that.

Regards Bertin

Re: Wizard prevent next step [message #991840 is a reply to message #991811] Thu, 20 December 2012 10:14 Go to previous message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 205
Registered: November 2010
Senior Member
Set "getConfiguredMandatory()" of that field to "true". Then, when the form is stored in the execDeactivate() method of your step, the form is validated automatically and a message is shown to the user. Technically, a VetoException is thrown which stops the wizard from advancing one step.

If you do not want to store the form (yet), as I assume by your last question, call the validation manually:

  @Override
  protected void execDeactivate(int stepKind) throws ProcessingException {
    if (stepKind == IWizardStep.STEP_NEXT) {
      getForm().validateForm(); // may throw a VetoException
    }
  }


Beat
Previous Topic:Using same formData on multiple forms
Next Topic:Deploying RAP UI on tomcat6
Goto Forum:
  


Current Time: Tue Apr 16 21:09:22 GMT 2024

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

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

Back to the top