Class WizardStep

    • Constructor Detail

      • WizardStep

        public WizardStep​(IModel<String> title,
                          IModel<String> summary)
        Creates a new step with the specified title and summary. The title and summary are displayed in the wizard title block while this step is active.
        Parameters:
        title - the title of this step.
        summary - a brief summary of this step or some usage guidelines.
      • WizardStep

        public WizardStep​(IModel<String> title,
                          IModel<String> summary,
                          IModel<?> model)
        Creates a new step with the specified title and summary. The title and summary are displayed in the wizard title block while this step is active.
        Parameters:
        title - the title of this step.
        summary - a brief summary of this step or some usage guidelines.
        model - Any model which is to be used for this step
      • WizardStep

        public WizardStep​(String title,
                          String summary)
        Creates a new step with the specified title and summary. The title and summary are displayed in the wizard title block while this step is active.
        Parameters:
        title - the title of this step.
        summary - a brief summary of this step or some usage guidelines.
      • WizardStep

        public WizardStep​(String title,
                          String summary,
                          IModel<?> model)
        Creates a new step with the specified title and summary. The title and summary are displayed in the wizard title block while this step is active.
        Parameters:
        title - the title of this step.
        summary - a brief summary of this step or some usage guidelines.
        model - Any model which is to be used for this step
    • Method Detail

      • add

        public final void add​(IFormValidator validator)
        Adds a form validator.
        Parameters:
        validator -
      • getSummary

        public String getSummary()
        Gets the summary of this step. This will be displayed in the title of the wizard while this step is active. The summary is typically an overview of the step or some usage guidelines for the user.
        Returns:
        the summary of this step.
      • getTitle

        public String getTitle()
        Gets the title of this step.
        Returns:
        the title of this step.
      • init

        public final void init​(IWizardModel wizardModel)
        Called to initialize the step. When this method is called depends on the kind of wizard model that is used. The static wizard model knows all the steps upfront and initializes themm when starting up. This method will be called when the wizard is initializing. The dynamic wizard model initializes steps every time they are encountered. This method sets the wizard model and then calls template method onInit(IWizardModel)
        Specified by:
        init in interface IWizardStep
        Parameters:
        wizardModel - the model to which the step belongs.
      • isComplete

        public boolean isComplete()
        Checks if this step is compete. This method should return true if the wizard can proceed to the next step. This property is bound and changes can be made at anytime by calling setComplete(boolean) .
        Specified by:
        isComplete in interface IWizardStep
        Returns:
        true if the wizard can proceed from this step, false otherwise.
        See Also:
        setComplete(boolean)
      • setComplete

        public void setComplete​(boolean complete)
        Marks this step as compete. The wizard will not be able to proceed from this step until this property is configured to true.
        Parameters:
        complete - true to allow the wizard to proceed, false otherwise.
        See Also:
        isComplete()
      • onInitialize

        protected void onInitialize()
        Description copied from class: Component
        This method is meant to be used as an alternative to initialize components. Usually the component's constructor is used for this task, but sometimes a component cannot be initialized in isolation, it may need to access its parent component or its markup in order to fully initialize. This method is invoked once per component's lifecycle when a path exists from this component to the Page thus providing the component with an atomic callback when the component's environment is built out.

        Overrides must call super#Component.onInitialize(). Usually this should be the first thing an override does, much like a constructor.

        Parent containers are guaranteed to be initialized before their children

        It is safe to use Component.getPage() in this method

        NOTE:The timing of this call is not precise, the contract is that it is called sometime before Component.onBeforeRender().

        Overrides:
        onInitialize in class MarkupContainer
      • onInit

        protected void onInit​(IWizardModel wizardModel)
        Template method that is called when the step is being initialized.
        Parameters:
        wizardModel -
        See Also:
        init(IWizardModel)