Search in sources :

Example 36 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageAccounts method initLinks.

private void initLinks(Form form, Form accForm) {
    AjaxSubmitLink listSyncDetails = new AjaxSubmitLink(ID_LIST_SYNC_DETAILS) {

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

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    form.add(listSyncDetails);
    AjaxSubmitLink export = new AjaxSubmitLink(ID_EXPORT) {

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

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    form.add(export);
    AjaxLink clearExport = new AjaxLink(ID_CLEAR_EXPORT) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            clearExportPerformed(target);
        }
    };
    accForm.add(clearExport);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) Form(org.apache.wicket.markup.html.form.Form) AjaxSubmitLink(org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink) AjaxLink(org.apache.wicket.ajax.markup.html.AjaxLink)

Example 37 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageBulkAction method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    CheckBox async = new CheckBox(ID_ASYNC, new PropertyModel<Boolean>(model, BulkActionDto.F_ASYNC));
    mainForm.add(async);
    AceEditor editor = new AceEditor(ID_EDITOR, new PropertyModel<String>(model, BulkActionDto.F_SCRIPT));
    mainForm.add(editor);
    AjaxSubmitButton start = new AjaxSubmitButton(ID_START, createStringResource("PageBulkAction.button.start")) {

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

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

Example 38 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageCertDefinitions method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    MainObjectListPanel<AccessCertificationDefinitionType> mainPanel = new MainObjectListPanel<AccessCertificationDefinitionType>(ID_TABLE, AccessCertificationDefinitionType.class, TableId.PAGE_CERT_DEFINITIONS_PANEL, null, this) {

        private static final long serialVersionUID = 1L;

        @Override
        protected IColumn<SelectableBean<AccessCertificationDefinitionType>, String> createCheckboxColumn() {
            return null;
        }

        @Override
        public void objectDetailsPerformed(AjaxRequestTarget target, AccessCertificationDefinitionType service) {
            PageCertDefinitions.this.detailsPerformed(target, service);
        }

        @Override
        protected List<IColumn<SelectableBean<AccessCertificationDefinitionType>, String>> createColumns() {
            return PageCertDefinitions.this.initColumns();
        }

        @Override
        protected List<InlineMenuItem> createInlineMenu() {
            return null;
        }

        @Override
        protected void newObjectPerformed(AjaxRequestTarget target) {
            navigateToNext(PageCertDefinition.class);
        }
    };
    mainPanel.setAdditionalBoxCssClasses(GuiStyleConstants.CLASS_OBJECT_CERT_DEF_BOX_CSS_CLASSES);
    mainForm.add(mainPanel);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) MainObjectListPanel(com.evolveum.midpoint.gui.api.component.MainObjectListPanel) AccessCertificationDefinitionType(com.evolveum.midpoint.xml.ns._public.common.common_3.AccessCertificationDefinitionType) Form(org.apache.wicket.markup.html.form.Form) IColumn(org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn) SelectableBean(com.evolveum.midpoint.web.component.util.SelectableBean) InlineMenuItem(com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)

Example 39 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageCertCampaigns method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    CertCampaignListItemDtoProvider provider = createProvider();
    int itemsPerPage = (int) getItemsPerPage(UserProfileStorage.TableId.PAGE_CERT_CAMPAIGNS_PANEL);
    BoxedTablePanel<CertCampaignListItemDto> table = new BoxedTablePanel<>(ID_CAMPAIGNS_TABLE, provider, initColumns(), UserProfileStorage.TableId.PAGE_CERT_CAMPAIGNS_PANEL, itemsPerPage);
    table.setShowPaging(true);
    table.setOutputMarkupId(true);
    table.setItemsPerPage(itemsPerPage);
    mainForm.add(table);
}
Also used : CertCampaignListItemDtoProvider(com.evolveum.midpoint.web.page.admin.certification.dto.CertCampaignListItemDtoProvider) Form(org.apache.wicket.markup.html.form.Form) CertCampaignListItemDto(com.evolveum.midpoint.web.page.admin.certification.dto.CertCampaignListItemDto) BoxedTablePanel(com.evolveum.midpoint.web.component.data.BoxedTablePanel)

Example 40 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageRequestRole method initLayout.

private void initLayout() {
    Form mainForm = new org.apache.wicket.markup.html.form.Form(ID_MAIN_FORM);
    add(mainForm);
    MultipleAssignmentSelectorPanel<UserType, UserType, RoleType> panel = new MultipleAssignmentSelectorPanel<>(ID_MAIN_PANEL, assignmentsModel, user, UserType.class, RoleType.class, this);
    mainForm.add(panel);
    initButtons(mainForm);
}
Also used : MultipleAssignmentSelectorPanel(com.evolveum.midpoint.web.component.assignment.MultipleAssignmentSelectorPanel) Form(org.apache.wicket.markup.html.form.Form)

Aggregations

Form (org.apache.wicket.markup.html.form.Form)109 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)78 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)37 ArrayList (java.util.ArrayList)26 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)25 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)21 Label (org.apache.wicket.markup.html.basic.Label)18 List (java.util.List)16 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)13 AjaxLink (org.apache.wicket.ajax.markup.html.AjaxLink)11 TextField (org.apache.wicket.markup.html.form.TextField)11 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)10 InlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)9 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)9 IModel (org.apache.wicket.model.IModel)9 PropertyModel (org.apache.wicket.model.PropertyModel)9 AceEditor (com.evolveum.midpoint.web.component.AceEditor)8 AjaxSubmitLink (org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink)8 ListItem (org.apache.wicket.markup.html.list.ListItem)8 ListView (org.apache.wicket.markup.html.list.ListView)8