Search in sources :

Example 41 with AjaxSubmitButton

use of com.evolveum.midpoint.web.component.AjaxSubmitButton in project midpoint by Evolveum.

the class PageResourceEdit method initButtons.

private void initButtons(final Form mainForm) {
    AjaxSubmitButton saveButton = new AjaxSubmitButton(ID_SAVE_BUTTON, createStringResource("PageBase.button.save")) {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            savePerformed(target);
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    mainForm.add(saveButton);
    AjaxButton backButton = new AjaxButton(ID_BACK_BUTTON, createStringResource("PageBase.button.back")) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            setResponsePage(new PageResources(false));
        }
    };
    mainForm.add(backButton);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) AjaxButton(com.evolveum.midpoint.web.component.AjaxButton) Form(org.apache.wicket.markup.html.form.Form)

Example 42 with AjaxSubmitButton

use of com.evolveum.midpoint.web.component.AjaxSubmitButton in project midpoint by Evolveum.

the class PageNewReport method initButtons.

private void initButtons(WebMarkupContainer buttonBar, IModel<Integer> inputType) {
    AjaxSubmitButton saveFileButton = new AjaxSubmitButton(ID_IMPORT_FILE_BUTTON, createStringResource("PageNewReport.button.import")) {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            importReportFromFilePerformed(target);
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    addVisibileForInputType(saveFileButton, INPUT_FILE, inputType);
    buttonBar.add(saveFileButton);
    AjaxSubmitButton saveXmlButton = new AjaxSubmitButton(ID_IMPORT_XML_BUTTON, createStringResource("PageNewReport.button.import")) {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            importReportFromStreamPerformed(target);
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    addVisibileForInputType(saveXmlButton, INPUT_XML, inputType);
    buttonBar.add(saveXmlButton);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) Form(org.apache.wicket.markup.html.form.Form)

Example 43 with AjaxSubmitButton

use of com.evolveum.midpoint.web.component.AjaxSubmitButton in project midpoint by Evolveum.

the class PageReport method initButtons.

private void initButtons(Form mainForm) {
    AjaxSubmitButton save = new AjaxSubmitButton(ID_SAVE_BUTTON, createStringResource("PageBase.button.save")) {

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            onSavePerformed(target);
        }
    };
    mainForm.add(save);
    AjaxSubmitButton cancel = new AjaxSubmitButton(ID_CANCEL_BUTTON, createStringResource("PageBase.button.cancel")) {

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            onCancelPerformed(target);
        }
    };
    mainForm.add(cancel);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) Form(org.apache.wicket.markup.html.form.Form)

Example 44 with AjaxSubmitButton

use of com.evolveum.midpoint.web.component.AjaxSubmitButton in project midpoint by Evolveum.

the class PageInternals method initInternalsConfigForm.

private void initInternalsConfigForm() {
    Form form = new Form(ID_INTERNALS_CONFIG_FORM);
    form.setOutputMarkupId(true);
    add(form);
    form.add(createCheckbox(ID_CONSISTENCY_CHECKS, InternalsConfigDto.F_CONSISTENCY_CHECKS));
    form.add(createCheckbox(ID_ENCRYPTION_CHECKS, InternalsConfigDto.F_ENCRYPTION_CHECKS));
    form.add(createCheckbox(ID_READ_ENCRYPTION_CHECKS, InternalsConfigDto.F_READ_ENCRYPTION_CHECKS));
    form.add(createCheckbox(ID_TOLERATE_UNDECLARED_PREFIXES, InternalsConfigDto.F_TOLERATE_UNDECLARED_PREFIXES));
    form.add(createCheckbox(ID_TRACE_REPOSITORY_OPERATIONS, InternalsConfigDto.F_TRACE_REPOSITORY_OPERATIONS));
    AjaxSubmitButton update = new AjaxSubmitButton(ID_UPDATE_INTERNALS_CONFIG, createStringResource("PageBase.button.update")) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            updateInternalConfig(target);
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    form.add(update);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) Form(org.apache.wicket.markup.html.form.Form)

Example 45 with AjaxSubmitButton

use of com.evolveum.midpoint.web.component.AjaxSubmitButton in project midpoint by Evolveum.

the class PageInternals method initDebugUtilForm.

private void initDebugUtilForm() {
    Form form = new Form(ID_DEBUG_UTIL_FORM);
    form.setOutputMarkupId(true);
    add(form);
    CheckFormGroup detailed = new CheckFormGroup(ID_DETAILED_DEBUG_DUMP, new PropertyModel<Boolean>(internalsModel, InternalsConfigDto.F_DETAILED_DEBUG_DUMP), createStringResource("PageInternals.detailedDebugDump"), LABEL_SIZE, INPUT_SIZE);
    form.add(detailed);
    AjaxSubmitButton update = new AjaxSubmitButton(ID_SAVE_DEBUG_UTIL, createStringResource("PageBase.button.update")) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            updateDebugPerformed(target);
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    form.add(update);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) Form(org.apache.wicket.markup.html.form.Form) CheckFormGroup(com.evolveum.midpoint.web.component.form.CheckFormGroup)

Aggregations

AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)67 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)65 Form (org.apache.wicket.markup.html.form.Form)27 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)23 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)23 MidpointForm (com.evolveum.midpoint.web.component.form.MidpointForm)20 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)12 ArrayList (java.util.ArrayList)9 List (java.util.List)8 Label (org.apache.wicket.markup.html.basic.Label)8 VisibleBehaviour (com.evolveum.midpoint.web.component.util.VisibleBehaviour)7 ListItem (org.apache.wicket.markup.html.list.ListItem)5 CheckFormGroup (com.evolveum.midpoint.web.component.form.CheckFormGroup)4 AceEditor (com.evolveum.midpoint.web.component.AceEditor)3 Form (com.evolveum.midpoint.web.component.form.Form)3 QNameChoiceRenderer (com.evolveum.midpoint.web.component.input.QNameChoiceRenderer)3 TextPanel (com.evolveum.midpoint.web.component.input.TextPanel)3 FeedbackAlerts (com.evolveum.midpoint.web.component.message.FeedbackAlerts)3 IOException (java.io.IOException)3 InputStream (java.io.InputStream)3