/** * Initialization * @param wizardModel the {@link IWizardModel} */ protected void init(final IWizardModel wizardModel) { if (wizardModel == null) { throw new IllegalArgumentException("argument wizardModel must be not null"); } this.wizardModel = wizardModel; this.wizardModel.addListener(this); // form // this.form = new Form<T>(Wizard.FORM_ID); this.add(this.form); // header (title + summary )// this.form.add(new EmptyPanel(Wizard.HEADER_ID)); // Feedback // this.feedback = new JQueryFeedbackPanel(Wizard.FEEDBACK_ID); this.form.add(this.feedback); // dummy view to be replaced // this.form.add(new EmptyPanel(Wizard.VIEW_ID)); // this.form.add(newOverviewBar(Wizard.OVERVIEW_ID)); //OverviewBar not handled }
/** * Initialization * * @param wizardModel the {@link IWizardModel} */ protected final void init(final IWizardModel wizardModel) { Args.notNull(wizardModel, "wizardModel"); this.wizardModel = wizardModel; this.wizardModel.addListener(this); // form // this.form = new Form<T>(Wizard.FORM_ID); this.add(this.form); // header (title + summary )// this.form.add(new EmptyPanel(Wizard.HEADER_ID)); // dummy view to be replaced // this.form.add(new EmptyPanel(Wizard.VIEW_ID)); // this.form.add(newOverviewBar(Wizard.OVERVIEW_ID)); //OverviewBar not handled }
form.addOrReplace(newOverviewBar(OVERVIEW_ID)); wizardModel.addListener(this);
/** * Initialize this wizard with a transition model. * <p> * If you constructed this wizard using a constructor without the transitions model argument, * <strong>you must</strong> call this method prior to actually using it. * </p> * * @param wizardModel */ protected void init(final IWizardModel wizardModel) { if (wizardModel == null) { throw new IllegalArgumentException("argument wizardModel must be not null"); } this.wizardModel = wizardModel; form = newForm(FORM_ID); addOrReplace(form); // dummy view to be replaced form.addOrReplace(new WebMarkupContainer(HEADER_ID)); form.addOrReplace(newFeedbackPanel(FEEDBACK_ID)); // add dummy view; will be replaced on initialization form.addOrReplace(new WebMarkupContainer(VIEW_ID)); form.addOrReplace(newButtonBar(BUTTONS_ID)); form.addOrReplace(newOverviewBar(OVERVIEW_ID)); wizardModel.addListener(this); // reset model to prepare for action wizardModel.reset(); }