Search in sources :

Example 6 with InfoTooltipBehavior

use of com.evolveum.midpoint.web.util.InfoTooltipBehavior in project midpoint by Evolveum.

the class SynchronizationReactionEditor method initLayout.

protected void initLayout(PageResourceWizard parentPage) {
    Label label = new Label(ID_LABEL, new ResourceModel("SynchronizationReactionEditor.label.edit"));
    add(label);
    TextField name = new TextField<>(ID_NAME, new PropertyModel<String>(getModel(), "name"));
    name.add(new ReactionListUpdateBehavior());
    parentPage.addEditingEnabledBehavior(name);
    add(name);
    TextArea description = new TextArea<>(ID_DESCRIPTION, new PropertyModel<String>(getModel(), "description"));
    parentPage.addEditingEnabledBehavior(description);
    add(description);
    DropDownChoice situation = new DropDownChoice<>(ID_SITUATION, new PropertyModel<SynchronizationSituationType>(getModel(), "situation"), WebComponentUtil.createReadonlyModelFromEnum(SynchronizationSituationType.class), new EnumChoiceRenderer<SynchronizationSituationType>(this));
    situation.setNullValid(true);
    situation.add(new ReactionListUpdateBehavior());
    parentPage.addEditingEnabledBehavior(situation);
    situation.add(new EmptyOnChangeAjaxFormUpdatingBehavior() {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            ((PageResourceWizard) getPageBase()).refreshIssues(target);
        }
    });
    add(situation);
    MultiValueDropDownPanel channel = new MultiValueDropDownPanel<String>(ID_CHANNEL, new PropertyModel<List<String>>(getModel(), "channel"), true, parentPage.getReadOnlyModel()) {

        @Override
        protected String createNewEmptyItem() {
            return "";
        }

        @Override
        protected IModel<List<String>> createChoiceList() {
            return new AbstractReadOnlyModel<List<String>>() {

                @Override
                public List<String> getObject() {
                    return WebComponentUtil.getChannelList();
                }
            };
        }

        @Override
        protected IChoiceRenderer<String> createRenderer() {
            return new StringChoiceRenderer("Channel.", "#");
        }
    };
    add(channel);
    TriStateComboPanel synchronize = new TriStateComboPanel(ID_SYNCHRONIZE, new PropertyModel<Boolean>(getModel(), "synchronize"));
    synchronize.getBaseFormComponent().add(new ReactionListUpdateBehavior());
    parentPage.addEditingEnabledBehavior(synchronize);
    add(synchronize);
    CheckBox reconcile = new CheckBox(ID_RECONCILE, new PropertyModel<Boolean>(getModel(), "reconcile"));
    parentPage.addEditingEnabledBehavior(reconcile);
    add(reconcile);
    DropDownChoice objectTemplateRef = new DropDownChoice<>(ID_OBJECT_TEMPLATE_REF, new PropertyModel<ObjectReferenceType>(getModel(), "objectTemplateRef"), new AbstractReadOnlyModel<List<ObjectReferenceType>>() {

        @Override
        public List<ObjectReferenceType> getObject() {
            return WebModelServiceUtils.createObjectReferenceList(ObjectTemplateType.class, getPageBase(), objectTemplateMap);
        }
    }, new ObjectReferenceChoiceRenderer(objectTemplateMap));
    objectTemplateRef.setNullValid(true);
    parentPage.addEditingEnabledBehavior(objectTemplateRef);
    add(objectTemplateRef);
    MultiValueTextEditPanel action = new MultiValueTextEditPanel<SynchronizationActionType>(ID_ACTION, new PropertyModel<List<SynchronizationActionType>>(getModel(), "action"), null, false, true, parentPage.getReadOnlyModel()) {

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

                @Override
                public String getObject() {
                    SynchronizationActionType action = model.getObject();
                    if (action == null) {
                        return null;
                    }
                    StringBuilder sb = new StringBuilder();
                    sb.append(action.getName() != null ? action.getName() : "-");
                    if (action.getHandlerUri() != null) {
                        sb.append(" (").append(StringUtils.substringAfter(action.getHandlerUri(), "#")).append(")");
                    }
                    return sb.toString();
                }
            };
        }

        @Override
        protected void performAddValueHook(AjaxRequestTarget target, SynchronizationActionType added) {
            target.add(parentStep.getReactionList());
            ((PageResourceWizard) getPageBase()).refreshIssues(target);
        }

        @Override
        protected void performRemoveValueHook(AjaxRequestTarget target, ListItem<SynchronizationActionType> item) {
            target.add(parentStep.getReactionList());
            ((PageResourceWizard) getPageBase()).refreshIssues(target);
        }

        @Override
        protected SynchronizationActionType createNewEmptyItem() {
            return new SynchronizationActionType();
        }

        @Override
        protected void editPerformed(AjaxRequestTarget target, SynchronizationActionType object) {
            actionEditPerformed(target, object);
        }
    };
    action.setOutputMarkupId(true);
    add(action);
    Label situationTooltip = new Label(ID_T_SITUATION);
    situationTooltip.add(new InfoTooltipBehavior());
    add(situationTooltip);
    Label channelTooltip = new Label(ID_T_CHANNEL);
    channelTooltip.add(new InfoTooltipBehavior());
    add(channelTooltip);
    Label synchronizeTooltip = new Label(ID_T_SYNCHRONIZE);
    synchronizeTooltip.add(new InfoTooltipBehavior());
    add(synchronizeTooltip);
    Label reconcileTooltip = new Label(ID_T_RECONCILE);
    reconcileTooltip.add(new InfoTooltipBehavior());
    add(reconcileTooltip);
    Label objTemplateTooltip = new Label(ID_T_OBJ_TEMPLATE);
    objTemplateTooltip.add(new InfoTooltipBehavior());
    add(objTemplateTooltip);
    Label actionTooltip = new Label(ID_T_ACTION);
    actionTooltip.add(new InfoTooltipBehavior());
    add(actionTooltip);
    initModals();
}
Also used : ObjectReferenceChoiceRenderer(com.evolveum.midpoint.web.component.input.ObjectReferenceChoiceRenderer) TriStateComboPanel(com.evolveum.midpoint.web.component.input.TriStateComboPanel) Label(org.apache.wicket.markup.html.basic.Label) MultiValueTextEditPanel(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextEditPanel) EmptyOnChangeAjaxFormUpdatingBehavior(com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnChangeAjaxFormUpdatingBehavior) MultiValueDropDownPanel(com.evolveum.midpoint.web.component.form.multivalue.MultiValueDropDownPanel) ArrayList(java.util.ArrayList) List(java.util.List) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) InfoTooltipBehavior(com.evolveum.midpoint.web.util.InfoTooltipBehavior) StringChoiceRenderer(com.evolveum.midpoint.web.component.input.StringChoiceRenderer) PageResourceWizard(com.evolveum.midpoint.web.page.admin.resources.PageResourceWizard) ListItem(org.apache.wicket.markup.html.list.ListItem)

Example 7 with InfoTooltipBehavior

use of com.evolveum.midpoint.web.util.InfoTooltipBehavior in project midpoint by Evolveum.

the class ResourceCredentialsEditor method initLayout.

protected void initLayout(final PageResourceWizard parentPage) {
    DropDownChoice fetchStrategy = new DropDownChoice<>(ID_FETCH_STRATEGY, new PropertyModel<AttributeFetchStrategyType>(getModel(), "password.fetchStrategy"), WebComponentUtil.createReadonlyModelFromEnum(AttributeFetchStrategyType.class), new EnumChoiceRenderer<AttributeFetchStrategyType>(this));
    parentPage.addEditingEnabledBehavior(fetchStrategy);
    add(fetchStrategy);
    VisibleEnableBehaviour showIfEditingOrOutboundExists = new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            ResourceCredentialsDefinitionType credentials = getModel().getObject();
            if (credentials == null || credentials.getPassword() == null) {
                return !parentPage.isReadOnly();
            }
            return !parentPage.isReadOnly() || credentials.getPassword().getOutbound() != null;
        }
    };
    TextField outboundLabel = new TextField<>(ID_OUTBOUND_LABEL, new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            ResourceCredentialsDefinitionType credentials = getModel().getObject();
            if (credentials == null || credentials.getPassword() == null) {
                return null;
            }
            // TODO: support multiple password mappings
            MappingType outbound = null;
            List<MappingType> outbounds = credentials.getPassword().getOutbound();
            if (!outbounds.isEmpty()) {
                outbound = outbounds.get(0);
            }
            return MappingTypeDto.createMappingLabel(outbound, LOGGER, getPageBase().getPrismContext(), getString("MappingType.label.placeholder"), getString("MultiValueField.nameNotSpecified"));
        }
    });
    outboundLabel.setEnabled(false);
    outboundLabel.setOutputMarkupId(true);
    outboundLabel.add(showIfEditingOrOutboundExists);
    add(outboundLabel);
    AjaxSubmitLink outbound = new AjaxSubmitLink(ID_OUTBOUND_BUTTON) {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            outboundEditPerformed(target);
        }
    };
    outbound.setOutputMarkupId(true);
    outbound.add(showIfEditingOrOutboundExists);
    add(outbound);
    MultiValueTextEditPanel inbound = new MultiValueTextEditPanel<MappingType>(ID_INBOUND, new PropertyModel<List<MappingType>>(getModel(), "password.inbound"), null, false, true, parentPage.getReadOnlyModel()) {

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

                @Override
                public String getObject() {
                    return MappingTypeDto.createMappingLabel(model.getObject(), LOGGER, getPageBase().getPrismContext(), getString("MappingType.label.placeholder"), getString("MultiValueField.nameNotSpecified"));
                }
            };
        }

        @Override
        protected MappingType createNewEmptyItem() {
            return WizardUtil.createEmptyMapping();
        }

        @Override
        protected void editPerformed(AjaxRequestTarget target, MappingType object) {
            inboundEditPerformed(target, object);
        }
    };
    inbound.setOutputMarkupId(true);
    add(inbound);
    DropDownChoice passwordPolicy = new DropDownChoice<>(ID_PASS_POLICY, new PropertyModel<ObjectReferenceType>(getModel(), "password.passwordPolicyRef"), new AbstractReadOnlyModel<List<ObjectReferenceType>>() {

        @Override
        public List<ObjectReferenceType> getObject() {
            return WebModelServiceUtils.createObjectReferenceList(ValuePolicyType.class, getPageBase(), passPolicyMap);
        }
    }, new ObjectReferenceChoiceRenderer(passPolicyMap));
    parentPage.addEditingEnabledBehavior(passwordPolicy);
    add(passwordPolicy);
    Label fetchTooltip = new Label(ID_T_FETCH);
    fetchTooltip.add(new InfoTooltipBehavior());
    add(fetchTooltip);
    Label outTooltip = new Label(ID_T_OUT);
    outTooltip.add(new InfoTooltipBehavior());
    add(outTooltip);
    Label inTooltip = new Label(ID_T_IN);
    inTooltip.add(new InfoTooltipBehavior());
    add(inTooltip);
    Label passPolicyTooltip = new Label(ID_T_PASS_POLICY);
    passPolicyTooltip.add(new InfoTooltipBehavior());
    add(passPolicyTooltip);
    initModals(parentPage.getReadOnlyModel());
}
Also used : ObjectReferenceChoiceRenderer(com.evolveum.midpoint.web.component.input.ObjectReferenceChoiceRenderer) Form(org.apache.wicket.markup.html.form.Form) 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) TextField(org.apache.wicket.markup.html.form.TextField) ArrayList(java.util.ArrayList) List(java.util.List) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour) IModel(org.apache.wicket.model.IModel) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) InfoTooltipBehavior(com.evolveum.midpoint.web.util.InfoTooltipBehavior) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice) NonEmptyModel(com.evolveum.midpoint.gui.api.model.NonEmptyModel) IModel(org.apache.wicket.model.IModel) AbstractReadOnlyModel(org.apache.wicket.model.AbstractReadOnlyModel) Model(org.apache.wicket.model.Model) PropertyModel(org.apache.wicket.model.PropertyModel)

Example 8 with InfoTooltipBehavior

use of com.evolveum.midpoint.web.util.InfoTooltipBehavior in project midpoint by Evolveum.

the class ResourceDependencyEditor method initLayout.

protected void initLayout(final PageResourceWizard parentPage) {
    WebMarkupContainer container = new WebMarkupContainer(ID_CONTAINER);
    container.setOutputMarkupId(true);
    add(container);
    ListView repeater = new ListView<ResourceObjectTypeDependencyType>(ID_REPEATER, getModel()) {

        @Override
        protected void populateItem(final ListItem<ResourceObjectTypeDependencyType> item) {
            WebMarkupContainer linkContainer = new WebMarkupContainer(ID_DEPENDENCY_LINK);
            linkContainer.setOutputMarkupId(true);
            linkContainer.add(new AttributeModifier("href", createCollapseItemId(item, true)));
            item.add(linkContainer);
            Label linkLabel = new Label(ID_DEPENDENCY_LINK_NAME, createDependencyLabelModel(item));
            linkContainer.add(linkLabel);
            AjaxLink delete = new AjaxLink(ID_DELETE_BUTTON) {

                @Override
                public void onClick(AjaxRequestTarget target) {
                    deleteDependencyPerformed(target, item);
                }
            };
            parentPage.addEditingVisibleBehavior(delete);
            linkContainer.add(delete);
            WebMarkupContainer dependencyBody = new WebMarkupContainer(ID_DEPENDENCY_BODY);
            dependencyBody.setOutputMarkupId(true);
            dependencyBody.setMarkupId(createCollapseItemId(item, false).getObject());
            if (changeState != ChangeState.SKIP) {
                dependencyBody.add(new AttributeModifier("class", new AbstractReadOnlyModel<String>() {

                    @Override
                    public String getObject() {
                        if (changeState == ChangeState.FIRST && item.getIndex() == 0) {
                            return "panel-collapse collapse in";
                        } else if (changeState == ChangeState.LAST && item.getIndex() == (getModelObject().size() - 1)) {
                            return "panel-collapse collapse in";
                        } else {
                            return "panel-collapse collapse";
                        }
                    }
                }));
            }
            item.add(dependencyBody);
            TextField order = new TextField<>(ID_ORDER, new PropertyModel<Integer>(item.getModelObject(), "order"));
            order.add(prepareAjaxOnComponentTagUpdateBehavior());
            parentPage.addEditingEnabledBehavior(order);
            dependencyBody.add(order);
            DropDownChoice strictness = new DropDownChoice<>(ID_STRICTNESS, new PropertyModel<ResourceObjectTypeDependencyStrictnessType>(item.getModelObject(), "strictness"), WebComponentUtil.createReadonlyModelFromEnum(ResourceObjectTypeDependencyStrictnessType.class), new EnumChoiceRenderer<ResourceObjectTypeDependencyStrictnessType>(this));
            strictness.add(prepareAjaxOnComponentTagUpdateBehavior());
            parentPage.addEditingEnabledBehavior(strictness);
            dependencyBody.add(strictness);
            DropDownChoice kind = new DropDownChoice<>(ID_KIND, new PropertyModel<ShadowKindType>(item.getModelObject(), "kind"), WebComponentUtil.createReadonlyModelFromEnum(ShadowKindType.class), new EnumChoiceRenderer<ShadowKindType>(this));
            kind.add(prepareAjaxOnComponentTagUpdateBehavior());
            parentPage.addEditingEnabledBehavior(kind);
            dependencyBody.add(kind);
            TextField intent = new TextField<>(ID_INTENT, new PropertyModel<String>(item.getModelObject(), "intent"));
            intent.add(prepareAjaxOnComponentTagUpdateBehavior());
            parentPage.addEditingEnabledBehavior(intent);
            dependencyBody.add(intent);
            DropDownChoice resource = new DropDownChoice<>(ID_REF, new PropertyModel<ObjectReferenceType>(item.getModelObject(), "resourceRef"), new AbstractReadOnlyModel<List<ObjectReferenceType>>() {

                @Override
                public List<ObjectReferenceType> getObject() {
                    return WebModelServiceUtils.createObjectReferenceList(ResourceType.class, getPageBase(), resourceMap);
                }
            }, new ObjectReferenceChoiceRenderer(resourceMap));
            resource.add(prepareAjaxOnComponentTagUpdateBehavior());
            parentPage.addEditingEnabledBehavior(resource);
            dependencyBody.add(resource);
            Label orderTooltip = new Label(ID_T_ORDER);
            orderTooltip.add(new InfoTooltipBehavior());
            dependencyBody.add(orderTooltip);
            Label strictnessTooltip = new Label(ID_T_STRICTNESS);
            strictnessTooltip.add(new InfoTooltipBehavior());
            dependencyBody.add(strictnessTooltip);
            Label kindTooltip = new Label(ID_T_KIND);
            kindTooltip.add(new InfoTooltipBehavior());
            dependencyBody.add(kindTooltip);
            Label intentTooltip = new Label(ID_T_INTENT);
            intentTooltip.add(new InfoTooltipBehavior());
            dependencyBody.add(intentTooltip);
            Label resourceRefTooltip = new Label(ID_T_RESOURCE_REF);
            resourceRefTooltip.add(new InfoTooltipBehavior());
            dependencyBody.add(resourceRefTooltip);
        }
    };
    repeater.setOutputMarkupId(true);
    container.add(repeater);
    AjaxLink add = new AjaxLink(ID_ADD_BUTTON) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            addDependencyPerformed(target);
        }
    };
    parentPage.addEditingVisibleBehavior(add);
    add(add);
}
Also used : ObjectReferenceChoiceRenderer(com.evolveum.midpoint.web.component.input.ObjectReferenceChoiceRenderer) AbstractReadOnlyModel(org.apache.wicket.model.AbstractReadOnlyModel) Label(org.apache.wicket.markup.html.basic.Label) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ListView(org.apache.wicket.markup.html.list.ListView) TextField(org.apache.wicket.markup.html.form.TextField) ArrayList(java.util.ArrayList) List(java.util.List) AjaxLink(org.apache.wicket.ajax.markup.html.AjaxLink) AttributeModifier(org.apache.wicket.AttributeModifier) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) InfoTooltipBehavior(com.evolveum.midpoint.web.util.InfoTooltipBehavior) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice) ListItem(org.apache.wicket.markup.html.list.ListItem)

Example 9 with InfoTooltipBehavior

use of com.evolveum.midpoint.web.util.InfoTooltipBehavior in project midpoint by Evolveum.

the class CapabilityActivationPanel method initLayout.

protected void initLayout(PageResourceWizard parentPage) {
    parentPage.addEditingEnabledBehavior(this);
    CheckBox validFromEnabled = new CheckBox(ID_CHECK_VALID_FROM_ENABLED, new PropertyModel<Boolean>(getModel(), "capability.validFrom.enabled"));
    add(validFromEnabled);
    CheckBox validFromReturned = new CheckBox(ID_CHECK_VALID_FROM_RETURNED, new PropertyModel<Boolean>(getModel(), "capability.validFrom.returnedByDefault"));
    add(validFromReturned);
    CheckBox validToEnabled = new CheckBox(ID_CHECK_VALID_TO_ENABLED, new PropertyModel<Boolean>(getModel(), "capability.validTo.enabled"));
    add(validToEnabled);
    CheckBox validToReturned = new CheckBox(ID_CHECK_VALID_TO_RETURNED, new PropertyModel<Boolean>(getModel(), "capability.validTo.returnedByDefault"));
    add(validToReturned);
    add(new CheckBox(ID_CHECK_STATUS_ENABLED, new PropertyModel<Boolean>(getModel(), "capability.status.enabled")));
    add(new CheckBox(ID_CHECK_STATUS_RETURNED, new PropertyModel<Boolean>(getModel(), "capability.status.returnedByDefault")));
    add(new CheckBox(ID_CHECK_STATUS_IGNORE, new PropertyModel<Boolean>(getModel(), "capability.status.ignoreAttribute")));
    MultiValueTextPanel statusEnableList = new MultiValueTextPanel<String>(ID_STATUS_ENABLE_LIST, new PropertyModel<List<String>>(getModel(), "capability.status.enableValue"), parentPage.getReadOnlyModel(), false) {

        @Override
        protected StringResourceModel createEmptyItemPlaceholder() {
            return createStringResource("capabilityActivationPanel.list.placeholder");
        }
    };
    add(statusEnableList);
    MultiValueTextPanel statusDisableList = new MultiValueTextPanel<String>(ID_STATUS_DISABLE_LIST, new PropertyModel<List<String>>(getModel(), "capability.status.disableValue"), parentPage.getReadOnlyModel(), false) {

        @Override
        protected StringResourceModel createEmptyItemPlaceholder() {
            return createStringResource("capabilityActivationPanel.list.placeholder");
        }
    };
    add(statusDisableList);
    IChoiceRenderer<QName> renderer = new QNameChoiceRenderer(true);
    DropDownChoice statusChoice = new DropDownChoice<>(ID_SELECT_STATUS, new PropertyModel<QName>(getModel(), "capability.status.attribute"), createAttributeChoiceModel(renderer), renderer);
    add(statusChoice);
    add(new CheckBox(ID_CHECK_LOCKOUT_ENABLED, new PropertyModel<Boolean>(getModel(), "capability.lockoutStatus.enabled")));
    add(new CheckBox(ID_CHECK_LOCKOUT_RETURNED, new PropertyModel<Boolean>(getModel(), "capability.lockoutStatus.returnedByDefault")));
    add(new CheckBox(ID_CHECK_LOCKOUT_IGNORE, new PropertyModel<Boolean>(getModel(), "capability.lockoutStatus.ignoreAttribute")));
    MultiValueTextPanel lockoutNormalList = new MultiValueTextPanel<String>(ID_LOCKOUT_NORMAL_LIST, new PropertyModel<List<String>>(getModel(), "capability.lockoutStatus.normalValue"), parentPage.getReadOnlyModel(), false) {

        @Override
        protected StringResourceModel createEmptyItemPlaceholder() {
            return createStringResource("capabilityActivationPanel.list.placeholder");
        }
    };
    add(lockoutNormalList);
    MultiValueTextPanel lockoutLockedList = new MultiValueTextPanel<String>(ID_LOCKOUT_LOCKED_LIST, new PropertyModel<List<String>>(getModel(), "capability.lockoutStatus.lockedValue"), parentPage.getReadOnlyModel(), false) {

        @Override
        protected StringResourceModel createEmptyItemPlaceholder() {
            return createStringResource("capabilityActivationPanel.list.placeholder");
        }
    };
    add(lockoutLockedList);
    IChoiceRenderer<QName> lockoutRenderer = new QNameChoiceRenderer(true);
    DropDownChoice lockoutChoice = new DropDownChoice<>(ID_SELECT_LOCKOUT, new PropertyModel<QName>(getModel(), "capability.lockoutStatus.attribute"), createAttributeChoiceModel(lockoutRenderer), lockoutRenderer);
    add(lockoutChoice);
    add(WebComponentUtil.createHelp(ID_T_L_ENABLED));
    add(WebComponentUtil.createHelp(ID_T_L_RETURNED_BY_DEFAULT));
    add(WebComponentUtil.createHelp(ID_T_L_IGNORE_ATTR));
    add(WebComponentUtil.createHelp(ID_T_L_ATTR_NAME));
    add(WebComponentUtil.createHelp(ID_T_L_NORMAL_LIST));
    add(WebComponentUtil.createHelp(ID_T_L_LOCKED_LIST));
    Label enabledTooltip = new Label(ID_T_ENABLED);
    enabledTooltip.add(new InfoTooltipBehavior());
    add(enabledTooltip);
    Label returnTooltip = new Label(ID_T_RETURNED_BY_DEFAULT);
    returnTooltip.add(new InfoTooltipBehavior());
    add(returnTooltip);
    Label ignoreTooltip = new Label(ID_T_IGNORE_ATTR);
    ignoreTooltip.add(new InfoTooltipBehavior());
    add(ignoreTooltip);
    Label attributeNameTooltip = new Label(ID_T_ATTR_NAME);
    attributeNameTooltip.add(new InfoTooltipBehavior());
    add(attributeNameTooltip);
    Label enableListTooltip = new Label(ID_T_ENABLE_LIST);
    enableListTooltip.add(new InfoTooltipBehavior());
    add(enableListTooltip);
    Label disableListTooltip = new Label(ID_T_DISABLE_LIST);
    disableListTooltip.add(new InfoTooltipBehavior());
    add(disableListTooltip);
    Label vFromEnabledTooltip = new Label(ID_T_V_FROM_ENABLED);
    vFromEnabledTooltip.add(new InfoTooltipBehavior());
    add(vFromEnabledTooltip);
    Label vFromReturnTooltip = new Label(ID_T_V_FROM_RETURN);
    vFromReturnTooltip.add(new InfoTooltipBehavior());
    add(vFromReturnTooltip);
    Label vToEnabledTooltip = new Label(ID_T_V_TO_ENABLED);
    vToEnabledTooltip.add(new InfoTooltipBehavior());
    add(vToEnabledTooltip);
    Label vToReturnTooltip = new Label(ID_T_V_TO_RETURN);
    vToReturnTooltip.add(new InfoTooltipBehavior());
    add(vToReturnTooltip);
}
Also used : QNameChoiceRenderer(com.evolveum.midpoint.web.component.input.QNameChoiceRenderer) QName(javax.xml.namespace.QName) PropertyModel(org.apache.wicket.model.PropertyModel) Label(org.apache.wicket.markup.html.basic.Label) InfoTooltipBehavior(com.evolveum.midpoint.web.util.InfoTooltipBehavior) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice) CheckBox(org.apache.wicket.markup.html.form.CheckBox) List(java.util.List) MultiValueTextPanel(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextPanel)

Example 10 with InfoTooltipBehavior

use of com.evolveum.midpoint.web.util.InfoTooltipBehavior in project midpoint by Evolveum.

the class CapabilityCredentialsPanel method initLayout.

protected void initLayout(final WebMarkupContainer capabilitiesTable, PageResourceWizard parentPage) {
    parentPage.addEditingEnabledBehavior(this);
    Label passLabel = new Label(ID_LABEL_PASSWORD, createStringResource("capabilityCredentialsPanel.label.password"));
    add(passLabel);
    CheckBox enabled = new CheckBox(ID_ENABLED, new PropertyModel<Boolean>(getModel(), "capability.enabled"));
    enabled.add(new EmptyOnChangeAjaxFormUpdatingBehavior() {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            target.add(capabilitiesTable);
        }
    });
    add(enabled);
    CheckBox passwordEnabled = new CheckBox(ID_PASSWORD_ENABLED, new PropertyModel<Boolean>(getModel(), "capability.password.enabled"));
    add(passwordEnabled);
    CheckBox passwordReturned = new CheckBox(ID_PASSWORD_RETURNED, new PropertyModel<Boolean>(getModel(), "capability.password.returnedByDefault"));
    add(passwordReturned);
    Label enabledTooltip = new Label(ID_T_ENABLED);
    enabledTooltip.add(new InfoTooltipBehavior());
    add(enabledTooltip);
    Label passEnabledTooltip = new Label(ID_T_PASS_ENABLED);
    passEnabledTooltip.add(new InfoTooltipBehavior());
    add(passEnabledTooltip);
    Label passReturnTooltip = new Label(ID_T_PASS_RETURN);
    passReturnTooltip.add(new InfoTooltipBehavior());
    add(passReturnTooltip);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) InfoTooltipBehavior(com.evolveum.midpoint.web.util.InfoTooltipBehavior) EmptyOnChangeAjaxFormUpdatingBehavior(com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnChangeAjaxFormUpdatingBehavior) CheckBox(org.apache.wicket.markup.html.form.CheckBox) Label(org.apache.wicket.markup.html.basic.Label)

Aggregations

InfoTooltipBehavior (com.evolveum.midpoint.web.util.InfoTooltipBehavior)32 Label (org.apache.wicket.markup.html.basic.Label)32 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)16 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)16 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)15 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)13 List (java.util.List)10 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)9 AttributeAppender (org.apache.wicket.behavior.AttributeAppender)8 TextField (org.apache.wicket.markup.html.form.TextField)8 ListItem (org.apache.wicket.markup.html.list.ListItem)8 EmptyOnChangeAjaxFormUpdatingBehavior (com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnChangeAjaxFormUpdatingBehavior)7 ArrayList (java.util.ArrayList)7 AjaxSubmitLink (org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink)7 CheckBox (org.apache.wicket.markup.html.form.CheckBox)7 MultiValueTextEditPanel (com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextEditPanel)6 PropertyModel (org.apache.wicket.model.PropertyModel)6 MultiValueTextPanel (com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextPanel)5 ObjectReferenceChoiceRenderer (com.evolveum.midpoint.web.component.input.ObjectReferenceChoiceRenderer)5 QName (javax.xml.namespace.QName)5