Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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

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: 92
Registered: November 2010
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:

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

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

Current Time: Wed May 23 04:50:32 GMT 2018

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

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

Back to the top