Search in sources :

Example 1 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class AssociationValueChoicePanel method initGenericDialog.

// for ModalWindow treatment see comments in ChooseTypePanel
private void initGenericDialog(final Class<C> type, final List<PrismPropertyValue> values) {
    final ModalWindow dialog = new ModalWindow(MODAL_ID_OBJECT_SELECTION_POPUP);
    ObjectSelectionPanel.Context context = new ObjectSelectionPanel.Context(this) {

        private static final long serialVersionUID = 1L;

        // See analogous discussion in ChooseTypePanel
        public AssociationValueChoicePanel getRealParent() {
            return WebComponentUtil.theSameForPage(AssociationValueChoicePanel.this, getCallingPageReference());
        }

        @Override
        public void chooseOperationPerformed(AjaxRequestTarget target, ObjectType object) {
            getRealParent().choosePerformed(target, object);
        }

        @Override
        public Collection<SelectorOptions<GetOperationOptions>> getDataProviderOptions() {
            return getAssociationsSearchOptions();
        }

        @Override
        public ObjectQuery getDataProviderQuery() {
            return query;
        }

        @Override
        public boolean isSearchEnabled() {
            //TODO don't commit
            return false;
        }

        @Override
        public Class<? extends ObjectType> getObjectTypeClass() {
            return type;
        }
    };
    ObjectSelectionPage.prepareDialog(dialog, context, this, "chooseTypeDialog.title", ID_TEXT_WRAPPER);
    add(dialog);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ObjectSelectionPanel(com.evolveum.midpoint.web.page.admin.configuration.component.ObjectSelectionPanel) SelectorOptions(com.evolveum.midpoint.schema.SelectorOptions) ModalWindow(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)

Example 2 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class AssociationValueChoicePanel method editValuePerformed.

public void editValuePerformed(AjaxRequestTarget target) {
    ModalWindow window = (ModalWindow) get(MODAL_ID_OBJECT_SELECTION_POPUP);
    window.show(target);
}
Also used : ModalWindow(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)

Example 3 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class SynchronizationReactionEditor method initModals.

private void initModals() {
    ModalWindow actionEditor = new SynchronizationActionEditorDialog(ID_ACTION_MODAL, null) {

        @Override
        public void updateComponents(AjaxRequestTarget target) {
            target.add(SynchronizationReactionEditor.this.get(ID_ACTION), parentStep.getReactionList());
        }
    };
    add(actionEditor);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ModalWindow(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)

Example 4 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class ResourceCredentialsEditor method initModals.

private void initModals(NonEmptyModel<Boolean> readOnlyModel) {
    ModalWindow inboundEditor = new MappingEditorDialog(ID_MODAL_INBOUND, null, readOnlyModel) {

        @Override
        public void updateComponents(AjaxRequestTarget target) {
            target.add(ResourceCredentialsEditor.this.get(ID_INBOUND));
        }
    };
    add(inboundEditor);
    ModalWindow outboundEditor = new MappingEditorDialog(ID_MODAL_OUTBOUND, null, readOnlyModel) {

        @Override
        public void updateComponents(AjaxRequestTarget target) {
            target.add(ResourceCredentialsEditor.this.get(ID_OUTBOUND_LABEL), ResourceCredentialsEditor.this.get(ID_OUTBOUND_BUTTON));
        }
    };
    add(outboundEditor);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) MappingEditorDialog(com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling.modal.MappingEditorDialog) ModalWindow(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)

Example 5 with ModalWindow

use of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow in project midpoint by Evolveum.

the class ResourceAssociationEditor method initModals.

private void initModals(NonEmptyModel<Boolean> readOnlyModel) {
    ModalWindow limitationsEditor = new LimitationsEditorDialog(ID_MODAL_LIMITATIONS, new PropertyModel<List<PropertyLimitationsType>>(getModel(), "limitations"), readOnlyModel);
    add(limitationsEditor);
    ModalWindow inboundEditor = new MappingEditorDialog(ID_MODAL_INBOUND, null, readOnlyModel) {

        @Override
        public void updateComponents(AjaxRequestTarget target) {
            target.add(ResourceAssociationEditor.this.get(ID_INBOUND), parentStep.getAssociationList());
        }
    };
    add(inboundEditor);
    ModalWindow outboundEditor = new MappingEditorDialog(ID_MODAL_OUTBOUND, null, readOnlyModel) {

        @Override
        public void updateComponents(AjaxRequestTarget target) {
            target.add(ResourceAssociationEditor.this.get(ID_OUTBOUND_LABEL), ResourceAssociationEditor.this.get(ID_BUTTON_OUTBOUND), parentStep.getAssociationList());
        }
    };
    add(outboundEditor);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) LimitationsEditorDialog(com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling.modal.LimitationsEditorDialog) MappingEditorDialog(com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling.modal.MappingEditorDialog) ArrayList(java.util.ArrayList) List(java.util.List) ModalWindow(org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)

Aggregations

ModalWindow (org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow)28 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)23 ConfirmationPanel (com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)10 MappingEditorDialog (com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling.modal.MappingEditorDialog)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)3 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)2 LimitationsEditorDialog (com.evolveum.midpoint.web.component.wizard.resource.component.schemahandling.modal.LimitationsEditorDialog)2 AceEditorDialog (com.evolveum.midpoint.web.page.admin.configuration.component.AceEditorDialog)2 ObjectSelectionPanel (com.evolveum.midpoint.web.page.admin.configuration.component.ObjectSelectionPanel)2 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)2 UserType (com.evolveum.midpoint.xml.ns._public.common.common_3.UserType)2 AjaxLink (org.apache.wicket.ajax.markup.html.AjaxLink)2 Label (org.apache.wicket.markup.html.basic.Label)2 ListItem (org.apache.wicket.markup.html.list.ListItem)2 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)2 ObjectBrowserPanel (com.evolveum.midpoint.gui.api.component.ObjectBrowserPanel)1 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)1