/** * Called to initialize the step. When this method is called depends on the kind of wizard model * that is used. * * The {@link WizardModel static wizard model} knows all the steps upfront and initializes themm * when starting up. This method will be called when the wizard is {@link #init(IWizardModel) * initializing}. * * The {@link DynamicWizardModel dynamic wizard model} initializes steps every time they are * encountered. * * This method sets the wizard model and then calls template method * {@link #onInit(IWizardModel)} * * @param wizardModel * the model to which the step belongs. */ @Override public final void init(final IWizardModel wizardModel) { this.wizardModel = wizardModel; onInit(wizardModel); }
/** * Sets summary. * * @param summary * summary */ public void setSummaryModel(final IModel<String> summary) { this.summary = wrap(summary); }
@Override public String getObject() { return getSummary(); } }).setEscapeModelStrings(false));
void execute() { Form<?> form = findParent(Form.class); form.add(formValidatorWrapper); } }
@Override protected void onBeforeRender() { super.onBeforeRender(); } }
@Override public String getObject() { return getTitle(); } }).setEscapeModelStrings(false));
@Override public Component getHeader(final String id, final Component parent, final IWizard wizard) { return super.getHeader(id, parent, wizard).setVisible(false); }
@Override protected void init(final IWizardModel wizardModel) { super.init(wizardModel); getForm().remove(FEEDBACK_ID); if (mode == Mode.READONLY) { final Iterator<IWizardStep> iter = wizardModel.stepIterator(); while (iter.hasNext()) { WizardStep.class.cast(iter.next()).setEnabled(false); } } }
@Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); if (org.apache.cxf.common.util.CollectionUtils.isEmpty(attrs.getObject()) && org.apache.cxf.common.util.CollectionUtils.isEmpty(membershipTOs.getObject())) { response.render(OnDomReadyHeaderItem.forScript( String.format("$('#emptyPlaceholder').append(\"%s\"); $('#attributes').hide();", getString("attribute.empty.list")))); } }
@Override public void onEvent(final IEvent<?> event) { if (event.getPayload() instanceof SearchClausePanel.SearchEvent) { final AjaxRequestTarget target = SearchClausePanel.SearchEvent.class.cast(event.getPayload()).getTarget(); if (Ownership.this.isGroupOwnership.getObject()) { final String fiql = SearchUtils.buildFIQL( groupSearchPanel.getModel().getObject(), SyncopeClient.getGroupSearchConditionBuilder()); groupDirectoryPanel.search(fiql, target); } else { final String fiql = SearchUtils.buildFIQL( userSearchPanel.getModel().getObject(), SyncopeClient.getUserSearchConditionBuilder()); userDirectoryPanel.search(fiql, target); } } else if (event.getPayload() instanceof AnySelectionDirectoryPanel.ItemSelection) { final AnyTO sel = ((AnySelectionDirectoryPanel.ItemSelection) event.getPayload()).getSelection(); if (sel == null) { wrapper.getInnerObject().setUserOwner(null); wrapper.getInnerObject().setGroupOwner(null); } else if (sel instanceof UserTO) { wrapper.getInnerObject().setUserOwner(sel.getKey()); wrapper.getInnerObject().setGroupOwner(null); } else if (sel instanceof GroupTO) { wrapper.getInnerObject().setGroupOwner(sel.getKey()); wrapper.getInnerObject().setUserOwner(null); } ((AnySelectionDirectoryPanel.ItemSelection) event.getPayload()).getTarget().add(ownerContainer); } else { super.onEvent(event); } }
@Override protected void onInitialize() { super.onInitialize(); Form<?> form = findParent(Form.class); form.add(formValidatorWrapper); }
/** * Sets title. * * @param title * title */ public void setTitleModel(final IModel<String> title) { this.title = wrap(title); }
/** * Called to initialize the step. When this method is called depends on the kind of wizard model * that is used. * * The {@link WizardModel static wizard model} knows all the steps upfront and initializes themm * when starting up. This method will be called when the wizard is {@link #init(IWizardModel) * initializing}. * * The {@link DynamicWizardModel dynamic wizard model} initializes steps every time they are * encountered. * * This method sets the wizard model and then calls template method * {@link #onInit(IWizardModel)} * * @param wizardModel * the model to which the step belongs. */ public final void init(IWizardModel wizardModel) { this.wizardModel = wizardModel; onInit(wizardModel); }
/** * Sets summary. * * @param summary * summary */ public void setSummaryModel(IModel<String> summary) { this.summary = wrap(summary); }
/** * Sets title. * * @param title * title */ public void setTitleModel(IModel<String> title) { this.title = wrap(title); }
/** * 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. * * @param title * the title of this step. * @param summary * a brief summary of this step or some usage guidelines. * @param model * Any model which is to be used for this step */ public WizardStep(final IModel<String> title, final IModel<String> summary, final IModel<?> model) { super(Wizard.VIEW_ID, model); this.title = wrap(title); this.summary = wrap(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. * * @param title * the title of this step. * @param summary * a brief summary of this step or some usage guidelines. * @param model * Any model which is to be used for this step */ public WizardStep(IModel<String> title, IModel<String> summary, IModel<?> model) { super(Wizard.VIEW_ID, model); this.title = wrap(title); this.summary = wrap(summary); }