Search in sources :

Example 6 with AutoCompleteSettings

use of org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings in project midpoint by Evolveum.

the class PageTaskAdd method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_FORM_MAIN);
    add(mainForm);
    final DropDownChoice resource = new DropDownChoice<>(ID_RESOURCE, new PropertyModel<TaskAddResourcesDto>(model, TaskAddDto.F_RESOURCE), new AbstractReadOnlyModel<List<TaskAddResourcesDto>>() {

        @Override
        public List<TaskAddResourcesDto> getObject() {
            return createResourceList();
        }
    }, new ChoiceableChoiceRenderer<TaskAddResourcesDto>());
    resource.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            TaskAddDto dto = model.getObject();
            boolean sync = TaskCategory.LIVE_SYNCHRONIZATION.equals(dto.getCategory());
            boolean recon = TaskCategory.RECONCILIATION.equals(dto.getCategory());
            boolean importAccounts = TaskCategory.IMPORTING_ACCOUNTS.equals(dto.getCategory());
            return sync || recon || importAccounts;
        }
    });
    resource.add(new AjaxFormComponentUpdatingBehavior("change") {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            PageTaskAdd.this.loadResource();
            target.add(get(ID_FORM_MAIN + ":" + ID_OBJECT_CLASS));
        }
    });
    resource.setOutputMarkupId(true);
    mainForm.add(resource);
    final DropDownChoice focusType = new DropDownChoice<>(ID_FOCUS_TYPE, new PropertyModel<QName>(model, TaskAddDto.F_FOCUS_TYPE), new AbstractReadOnlyModel<List<QName>>() {

        @Override
        public List<QName> getObject() {
            return createFocusTypeList();
        }
    }, new QNameChoiceRenderer());
    focusType.setOutputMarkupId(true);
    focusType.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            TaskAddDto dto = model.getObject();
            return TaskCategory.RECOMPUTATION.equals(dto.getCategory());
        }
    });
    mainForm.add(focusType);
    final DropDownChoice kind = new DropDownChoice<>(ID_KIND, new PropertyModel<ShadowKindType>(model, TaskAddDto.F_KIND), WebComponentUtil.createReadonlyModelFromEnum(ShadowKindType.class), new EnumChoiceRenderer<ShadowKindType>());
    kind.setOutputMarkupId(true);
    kind.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            TaskAddDto dto = model.getObject();
            boolean sync = TaskCategory.LIVE_SYNCHRONIZATION.equals(dto.getCategory());
            boolean recon = TaskCategory.RECONCILIATION.equals(dto.getCategory());
            boolean importAccounts = TaskCategory.IMPORTING_ACCOUNTS.equals(dto.getCategory());
            return sync || recon || importAccounts;
        }
    });
    mainForm.add(kind);
    final TextField<String> intent = new TextField<>(ID_INTENT, new PropertyModel<String>(model, TaskAddDto.F_INTENT));
    mainForm.add(intent);
    intent.setOutputMarkupId(true);
    intent.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            TaskAddDto dto = model.getObject();
            boolean sync = TaskCategory.LIVE_SYNCHRONIZATION.equals(dto.getCategory());
            boolean recon = TaskCategory.RECONCILIATION.equals(dto.getCategory());
            boolean importAccounts = TaskCategory.IMPORTING_ACCOUNTS.equals(dto.getCategory());
            return sync || recon || importAccounts;
        }
    });
    if (model.getObject() != null && model.getObject().getResource() != null && model.getObject().getResource().getOid() != null) {
        loadResource();
    }
    AutoCompleteSettings autoCompleteSettings = new AutoCompleteSettings();
    autoCompleteSettings.setShowListOnEmptyInput(true);
    autoCompleteSettings.setMaxHeightInPx(200);
    final AutoCompleteTextField<String> objectClass = new AutoCompleteTextField<String>(ID_OBJECT_CLASS, new PropertyModel<String>(model, TaskAddDto.F_OBJECT_CLASS), autoCompleteSettings) {

        @Override
        protected Iterator<String> getChoices(String input) {
            return prepareObjectClassChoiceList(input);
        }
    };
    objectClass.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            TaskAddDto dto = model.getObject();
            boolean sync = TaskCategory.LIVE_SYNCHRONIZATION.equals(dto.getCategory());
            boolean recon = TaskCategory.RECONCILIATION.equals(dto.getCategory());
            boolean importAccounts = TaskCategory.IMPORTING_ACCOUNTS.equals(dto.getCategory());
            return sync || recon || importAccounts;
        }
    });
    mainForm.add(objectClass);
    DropDownChoice type = new DropDownChoice<>(ID_CATEGORY, new PropertyModel<String>(model, TaskAddDto.F_CATEGORY), new AbstractReadOnlyModel<List<String>>() {

        @Override
        public List<String> getObject() {
            return WebComponentUtil.createTaskCategoryList();
        }
    }, new StringChoiceRenderer("pageTask.category."));
    type.add(new AjaxFormComponentUpdatingBehavior("change") {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            target.add(resource);
            target.add(intent);
            target.add(kind);
            target.add(objectClass);
            target.add(focusType);
        }
    });
    type.setRequired(true);
    mainForm.add(type);
    TextField<String> name = new TextField<>(ID_NAME, new PropertyModel<String>(model, TaskAddDto.F_NAME));
    name.setRequired(true);
    mainForm.add(name);
    initScheduling(mainForm);
    initAdvanced(mainForm);
    CheckBox dryRun = new CheckBox(ID_DRY_RUN, new PropertyModel<Boolean>(model, TaskAddDto.F_DRY_RUN));
    mainForm.add(dryRun);
    initButtons(mainForm);
}
Also used : TaskAddDto(com.evolveum.midpoint.web.page.admin.server.dto.TaskAddDto) Form(org.apache.wicket.markup.html.form.Form) AutoCompleteTextField(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField) TextField(org.apache.wicket.markup.html.form.TextField) AutoCompleteTextField(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField) DateTextField(org.apache.wicket.datetime.markup.html.form.DateTextField) List(java.util.List) ArrayList(java.util.ArrayList) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour) AjaxFormComponentUpdatingBehavior(org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior) QNameChoiceRenderer(com.evolveum.midpoint.web.component.input.QNameChoiceRenderer) QName(javax.xml.namespace.QName) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AutoCompleteSettings(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice) StringChoiceRenderer(com.evolveum.midpoint.web.component.input.StringChoiceRenderer) CheckBox(org.apache.wicket.markup.html.form.CheckBox) AjaxCheckBox(org.apache.wicket.ajax.markup.html.form.AjaxCheckBox) TaskAddResourcesDto(com.evolveum.midpoint.web.page.admin.server.dto.TaskAddResourcesDto) ShadowKindType(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType)

Example 7 with AutoCompleteSettings

use of org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings in project midpoint by Evolveum.

the class MultiValueAutoCompleteTextPanel method initLayout.

private void initLayout(final boolean inputEnabled, final NonEmptyModel<Boolean> readOnlyModel) {
    WebMarkupContainer placeholderContainer = new WebMarkupContainer(ID_PLACEHOLDER_CONTAINER);
    placeholderContainer.setOutputMarkupPlaceholderTag(true);
    placeholderContainer.setOutputMarkupPlaceholderTag(true);
    placeholderContainer.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return getModel().getObject().isEmpty();
        }
    });
    add(placeholderContainer);
    AjaxLink<Void> placeholderAdd = new AjaxLink<Void>(ID_PLACEHOLDER_ADD) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            addValuePerformed(target);
        }
    };
    placeholderAdd.add(new AttributeAppender("class", new IModel<String>() {

        @Override
        public String getObject() {
            if (buttonsDisabled()) {
                return " " + CSS_DISABLED;
            }
            return "";
        }
    }));
    placeholderAdd.setOutputMarkupId(true);
    placeholderAdd.setOutputMarkupPlaceholderTag(true);
    placeholderAdd.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
    placeholderContainer.add(placeholderAdd);
    ListView repeater = new ListView<T>(ID_REPEATER, getModel()) {

        @Override
        protected void populateItem(final ListItem<T> item) {
            AutoCompleteSettings autoCompleteSettings = new AutoCompleteSettings();
            autoCompleteSettings.setShowListOnEmptyInput(true);
            autoCompleteSettings.setMaxHeightInPx(200);
            AutoCompleteTextField<String> autoCompleteEditor = new AutoCompleteTextField<String>(ID_TEXT, createTextModel(item.getModel()), autoCompleteSettings) {

                @Override
                protected Iterator<String> getChoices(String input) {
                    return createAutoCompleteObjectList(input);
                }
            };
            autoCompleteEditor.add(createAutoCompleteValidator());
            autoCompleteEditor.add(new AjaxFormComponentUpdatingBehavior("change") {

                @Override
                protected void onUpdate(AjaxRequestTarget target) {
                }
            });
            item.add(autoCompleteEditor);
            autoCompleteEditor.add(AttributeAppender.replace("placeholder", createEmptyItemPlaceholder()));
            if (!inputEnabled) {
                autoCompleteEditor.add(new AttributeModifier("disabled", "disabled"));
            }
            item.add(autoCompleteEditor);
            WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP);
            item.add(buttonGroup);
            initButtons(buttonGroup, item, readOnlyModel);
        }
    };
    repeater.setOutputMarkupId(true);
    repeater.setOutputMarkupPlaceholderTag(true);
    repeater.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return !getModel().getObject().isEmpty();
        }
    });
    add(repeater);
}
Also used : AjaxFormComponentUpdatingBehavior(org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior) IModel(org.apache.wicket.model.IModel) AttributeModifier(org.apache.wicket.AttributeModifier) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AutoCompleteSettings(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings) AutoCompleteTextField(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField) ListView(org.apache.wicket.markup.html.list.ListView) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour) ListItem(org.apache.wicket.markup.html.list.ListItem) AjaxLink(org.apache.wicket.ajax.markup.html.AjaxLink) AttributeAppender(org.apache.wicket.behavior.AttributeAppender)

Example 8 with AutoCompleteSettings

use of org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings in project midpoint by Evolveum.

the class AutoCompleteTextPanel method createAutoCompleteSettings.

@Override
protected AutoCompleteSettings createAutoCompleteSettings() {
    AutoCompleteSettings settings = super.createAutoCompleteSettings();
    settings.setThrottleDelay(500);
    return settings;
}
Also used : AutoCompleteSettings(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings)

Example 9 with AutoCompleteSettings

use of org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings in project midpoint by Evolveum.

the class SchemaHandlingStep method initObjectTypeEditor.

private void initObjectTypeEditor(WebMarkupContainer editor) {
    Label editorLabel = new Label(ID_EDITOR_NAME, (IModel<Object>) () -> {
        ResourceObjectTypeDefinitionTypeDto selected = schemaHandlingDtoModel.getObject().getSelectedObjectTypeDto();
        return selected != null ? selected.getObjectType().getDisplayName() : "";
    });
    editorLabel.setOutputMarkupId(true);
    editor.add(editorLabel);
    DropDownChoice<?> editorKind = new DropDownChoice<>(ID_EDITOR_KIND, new PropertyModel<>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_KIND)), WebComponentUtil.createReadonlyModelFromEnum(ShadowKindType.class), new EnumChoiceRenderer<>(this));
    editorKind.add(new UpdateNamesBehaviour());
    parentPage.addEditingEnabledBehavior(editorKind);
    editor.add(editorKind);
    TextField<?> editorIntent = new TextField<>(ID_EDITOR_INTENT, new PropertyModel<String>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_INTENT)));
    editorIntent.add(new UpdateNamesBehaviour());
    parentPage.addEditingEnabledBehavior(editorIntent);
    editor.add(editorIntent);
    TextField<?> editorDisplayName = new TextField<>(ID_EDITOR_DISPLAY_NAME, new PropertyModel<String>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_DISPLAY_NAME)));
    editorDisplayName.add(new UpdateNamesBehaviour());
    parentPage.addEditingEnabledBehavior(editorDisplayName);
    editor.add(editorDisplayName);
    TextArea<?> editorDescription = new TextArea<>(ID_EDITOR_DESCRIPTION, new PropertyModel<String>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_DESCRIPTION)));
    parentPage.addEditingEnabledBehavior(editorDescription);
    editor.add(editorDescription);
    final CheckBox editorDefault = new CheckBox(ID_EDITOR_DEFAULT, new PropertyModel<>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_DEFAULT)));
    editorDefault.add(new EmptyOnChangeAjaxFormUpdatingBehavior() {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            Boolean newValue = editorDefault.getModelObject();
            if (Boolean.TRUE.equals(newValue)) {
                SchemaHandlingDto dto = schemaHandlingDtoModel.getObject();
                ResourceObjectTypeDefinitionTypeDto selected = dto.getSelectedObjectTypeDto();
                ShadowKindType selectedKind = fillDefault(selected.getObjectType().getKind());
                for (ResourceObjectTypeDefinitionTypeDto currentObjectTypeDto : dto.getObjectTypeDtoList()) {
                    ShadowKindType currentKind = fillDefault(currentObjectTypeDto.getObjectType().getKind());
                    if (currentObjectTypeDto != selected && currentKind == selectedKind && Boolean.TRUE.equals(currentObjectTypeDto.getObjectType().isDefault())) {
                        currentObjectTypeDto.getObjectType().setDefault(false);
                    }
                }
            }
            parentPage.refreshIssues(target);
        }
    });
    parentPage.addEditingEnabledBehavior(editorDefault);
    editor.add(editorDefault);
    AjaxSubmitLink editorDependency = new AjaxSubmitLink(ID_EDITOR_BUTTON_DEPENDENCY) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            dependencyEditPerformed(target);
        }
    };
    addDisabledClassModifier(editorDependency);
    editor.add(editorDependency);
    AutoCompleteSettings autoCompleteSettings = new AutoCompleteSettings();
    autoCompleteSettings.setShowListOnEmptyInput(true);
    autoCompleteSettings.setMaxHeightInPx(200);
    AutoCompleteTextField<String> editorObjectClass = new AutoCompleteTextField<String>(ID_EDITOR_OBJECT_CLASS, new PropertyModel<>(schemaHandlingDtoModel, SchemaHandlingDto.F_OBJECT_CLASS_NAME), autoCompleteSettings) {

        @Override
        protected Iterator<String> getChoices(String input) {
            return getObjectClassChoices(input);
        }
    };
    editorObjectClass.add(new UpdateNamesBehaviour());
    editorObjectClass.add(createObjectClassValidator((IModel<List<QName>>) () -> schemaHandlingDtoModel.getObject().getObjectClassList()));
    parentPage.addEditingEnabledBehavior(editorObjectClass);
    editorObjectClass.setConvertEmptyInputStringToNull(true);
    editor.add(editorObjectClass);
    MultiValueTextEditPanel<?> editorAttributes = new MultiValueTextEditPanel<ResourceAttributeDefinitionType>(ID_EDITOR_ATTRIBUTES, new PropertyModel<>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_ATTRIBUTE)), new PropertyModel<>(schemaHandlingDtoModel, SchemaHandlingDto.F_SELECTED_ATTRIBUTE), false, true, parentPage.getReadOnlyModel()) {

        @Override
        protected IModel<String> createTextModel(final IModel<ResourceAttributeDefinitionType> model) {
            return new Model<String>() {

                @Override
                public String getObject() {
                    if (model == null || model.getObject() == null) {
                        return null;
                    }
                    ResourceAttributeDefinitionType attribute = model.getObject();
                    return formatItemInfo(attribute, attribute.getRef(), attribute.getDisplayName(), attribute.getInbound(), attribute.getOutbound());
                }
            };
        }

        @Override
        protected ResourceAttributeDefinitionType createNewEmptyItem() {
            return createEmptyAttributeObject();
        }

        @Override
        protected void performAddValueHook(AjaxRequestTarget target, ResourceAttributeDefinitionType added) {
            parentPage.refreshIssues(target);
        }

        @Override
        protected void editPerformed(AjaxRequestTarget target, ResourceAttributeDefinitionType object) {
            editAttributePerformed(target, object);
        }

        @Override
        protected boolean buttonsDisabled() {
            return !isAnySelected();
        }

        @Override
        protected void performRemoveValueHook(AjaxRequestTarget target, ListItem<ResourceAttributeDefinitionType> item) {
            resetThirdRowContainer(target);
            parentPage.refreshIssues(target);
        }
    };
    editorAttributes.setOutputMarkupId(true);
    editor.add(editorAttributes);
    MultiValueTextEditPanel<?> editorAssociations = new MultiValueTextEditPanel<ResourceObjectAssociationType>(ID_EDITOR_ASSOCIATIONS, new PropertyModel<>(schemaHandlingDtoModel, getExpression(ResourceObjectTypeDefinitionType.F_ASSOCIATION)), new PropertyModel<>(schemaHandlingDtoModel, SchemaHandlingDto.F_SELECTED_ASSOCIATION), false, true, parentPage.getReadOnlyModel()) {

        @Override
        protected IModel<String> createTextModel(final IModel<ResourceObjectAssociationType> model) {
            return new Model<String>() {

                @Override
                public String getObject() {
                    ResourceObjectAssociationType association = model.getObject();
                    if (association == null) {
                        return null;
                    }
                    return formatItemInfo(association, association.getRef(), association.getDisplayName(), association.getInbound(), association.getOutbound());
                }
            };
        }

        @Override
        protected ResourceObjectAssociationType createNewEmptyItem() {
            return createEmptyAssociationObject();
        }

        @Override
        protected void performAddValueHook(AjaxRequestTarget target, ResourceObjectAssociationType added) {
            parentPage.refreshIssues(target);
        }

        @Override
        protected void editPerformed(AjaxRequestTarget target, ResourceObjectAssociationType object) {
            editAssociationPerformed(target, object);
        }

        @Override
        protected boolean buttonsDisabled() {
            return !isAnySelected();
        }

        @Override
        protected void performRemoveValueHook(AjaxRequestTarget target, ListItem<ResourceObjectAssociationType> item) {
            resetThirdRowContainer(target);
            parentPage.refreshIssues(target);
        }
    };
    editorAssociations.setOutputMarkupId(true);
    editor.add(editorAssociations);
    // DropDownChoice editorAssignmentPolicyRef = new DropDownChoice<>(ID_EDITOR_ASSIGNMENT_POLICY,
    // new PropertyModel<AssignmentPolicyEnforcementType>(schemaHandlingDtoModel,
    // getExpression(ResourceObjectTypeDefinitionType.F_ASSIGNMENT_POLICY_ENFORCEMENT)),
    // WebComponentUtil.createReadonlyModelFromEnum(AssignmentPolicyEnforcementType.class),
    // new EnumChoiceRenderer<AssignmentPolicyEnforcementType>(this));
    // parentPage.addEditingEnabledBehavior(editorAssignmentPolicyRef);
    // editor.add(editorAssignmentPolicyRef);
    AjaxSubmitLink editorIteration = new AjaxSubmitLink(ID_EDITOR_BUTTON_ITERATION) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            iterationEditPerformed(target);
        }
    };
    addDisabledClassModifier(editorIteration);
    editor.add(editorIteration);
    AjaxSubmitLink editorProtected = new AjaxSubmitLink(ID_EDITOR_BUTTON_PROTECTED) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            protectedEditPerformed(target);
        }
    };
    addDisabledClassModifier(editorProtected);
    editor.add(editorProtected);
    AjaxSubmitLink editorActivation = new AjaxSubmitLink(ID_EDITOR_BUTTON_ACTIVATION) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            activationEditPerformed(target);
        }
    };
    addDisabledClassModifier(editorActivation);
    editor.add(editorActivation);
    AjaxSubmitLink editorCredentials = new AjaxSubmitLink(ID_EDITOR_BUTTON_CREDENTIALS) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            credentialsEditPerformed(target);
        }
    };
    addDisabledClassModifier(editorCredentials);
    editor.add(editorCredentials);
    Label kindTooltip = new Label(ID_T_KIND);
    kindTooltip.add(new InfoTooltipBehavior());
    editor.add(kindTooltip);
    Label intentTooltip = new Label(ID_T_INTENT);
    intentTooltip.add(new InfoTooltipBehavior());
    editor.add(intentTooltip);
    Label defaultTooltip = new Label(ID_T_DEFAULT);
    defaultTooltip.add(new InfoTooltipBehavior());
    editor.add(defaultTooltip);
    Label dependencyTooltip = new Label(ID_T_DEPENDENCY);
    dependencyTooltip.add(new InfoTooltipBehavior());
    editor.add(dependencyTooltip);
    Label objectClassTooltip = new Label(ID_T_OBJECT_CLASS);
    objectClassTooltip.add(new InfoTooltipBehavior());
    editor.add(objectClassTooltip);
    Label attributesTooltip = new Label(ID_T_ATTRIBUTES);
    attributesTooltip.add(new InfoTooltipBehavior());
    editor.add(attributesTooltip);
    Label associationsTooltip = new Label(ID_T_ASSOCIATIONS);
    associationsTooltip.add(new InfoTooltipBehavior());
    editor.add(associationsTooltip);
    Label iterationTooltip = new Label(ID_T_ITERATION);
    iterationTooltip.add(AttributeAppender.append("title", createStringResource("SchemaHandlingStep.tooltip.iteration", WebComponentUtil.getMidpointCustomSystemName(getPageBase(), "midpoint.default.system.name"))));
    iterationTooltip.add(new InfoTooltipBehavior());
    editor.add(iterationTooltip);
    Label protectedTooltip = new Label(ID_T_PROTECTED);
    protectedTooltip.add(new InfoTooltipBehavior());
    editor.add(protectedTooltip);
    Label activationTooltip = new Label(ID_T_ACTIVATION);
    activationTooltip.add(new InfoTooltipBehavior());
    editor.add(activationTooltip);
    Label credentialsTooltip = new Label(ID_T_CREDENTIALS);
    credentialsTooltip.add(new InfoTooltipBehavior());
    editor.add(credentialsTooltip);
}
Also used : Label(org.apache.wicket.markup.html.basic.Label) AjaxSubmitLink(org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink) MultiValueTextEditPanel(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextEditPanel) EmptyOnChangeAjaxFormUpdatingBehavior(com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnChangeAjaxFormUpdatingBehavior) AutoCompleteTextField(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField) ResourceObjectTypeDefinitionTypeDto(com.evolveum.midpoint.web.component.wizard.resource.dto.ResourceObjectTypeDefinitionTypeDto) AutoCompleteTextField(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField) IModel(org.apache.wicket.model.IModel) QName(javax.xml.namespace.QName) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) InfoTooltipBehavior(com.evolveum.midpoint.web.util.InfoTooltipBehavior) SchemaHandlingDto(com.evolveum.midpoint.web.component.wizard.resource.dto.SchemaHandlingDto) AutoCompleteSettings(org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings) IModel(org.apache.wicket.model.IModel) Model(org.apache.wicket.model.Model) NonEmptyLoadableModel(com.evolveum.midpoint.gui.api.model.NonEmptyLoadableModel) PropertyModel(org.apache.wicket.model.PropertyModel) PrismObject(com.evolveum.midpoint.prism.PrismObject) ListItem(org.apache.wicket.markup.html.list.ListItem)

Aggregations

AutoCompleteSettings (org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings)9 AutoCompleteTextField (org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField)7 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)6 IModel (org.apache.wicket.model.IModel)4 PrismObject (com.evolveum.midpoint.prism.PrismObject)3 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)3 QName (javax.xml.namespace.QName)3 AjaxFormComponentUpdatingBehavior (org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior)3 TextField (org.apache.wicket.markup.html.form.TextField)3 Model (org.apache.wicket.model.Model)3 TaskAddResourcesDto (com.evolveum.midpoint.web.page.admin.server.dto.TaskAddResourcesDto)2 ShadowKindType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 OnChangeAjaxBehavior (org.apache.wicket.ajax.form.OnChangeAjaxBehavior)2 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)2 CheckBox (org.apache.wicket.markup.html.form.CheckBox)2 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)2 ListItem (org.apache.wicket.markup.html.list.ListItem)2 PropertyModel (org.apache.wicket.model.PropertyModel)2