Search in sources :

Example 6 with MultiValueTextPanel

use of com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextPanel in project midpoint by Evolveum.

the class CapabilityScriptPanel method initLayout.

protected void initLayout(final WebMarkupContainer capabilitiesTable, PageResourceWizard parentPage) {
    parentPage.addEditingEnabledBehavior(this);
    CheckBox enabled = new CheckBox(ID_ENABLED, new PropertyModel<>(getModel(), "capability.enabled"));
    enabled.add(new EmptyOnChangeAjaxFormUpdatingBehavior() {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            target.add(capabilitiesTable);
        }
    });
    add(enabled);
    MultiValueTextPanel onConnector = new MultiValueTextPanel(ID_ON_CONNECTOR, prepareOnConnectorModel(), parentPage.getReadOnlyModel(), true);
    add(onConnector);
    MultiValueTextPanel onResource = new MultiValueTextPanel(ID_ON_RESOURCE, Model.of(prepareOnResourceModel()), parentPage.getReadOnlyModel(), true);
    add(onResource);
    Label enabledTooltip = new Label(ID_T_ENABLED);
    enabledTooltip.add(new InfoTooltipBehavior());
    add(enabledTooltip);
    Label onConnectorTooltip = new Label(ID_T_ON_CONNECTOR);
    onConnectorTooltip.add(new InfoTooltipBehavior());
    add(onConnectorTooltip);
    Label onResourceTooltip = new Label(ID_T_ON_RESOURCE);
    onResourceTooltip.add(new InfoTooltipBehavior());
    add(onResourceTooltip);
}
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) MultiValueTextPanel(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextPanel)

Aggregations

MultiValueTextPanel (com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextPanel)6 InfoTooltipBehavior (com.evolveum.midpoint.web.util.InfoTooltipBehavior)5 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)5 Label (org.apache.wicket.markup.html.basic.Label)5 ArrayList (java.util.ArrayList)4 List (java.util.List)4 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)3 EmptyOnChangeAjaxFormUpdatingBehavior (com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnChangeAjaxFormUpdatingBehavior)3 NonEmptyModel (com.evolveum.midpoint.gui.api.model.NonEmptyModel)2 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)2 MultiValueTextEditPanel (com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextEditPanel)2 QNameChoiceRenderer (com.evolveum.midpoint.web.component.input.QNameChoiceRenderer)2 PageResourceWizard (com.evolveum.midpoint.web.page.admin.resources.PageResourceWizard)2 QName (javax.xml.namespace.QName)2 AjaxLink (org.apache.wicket.ajax.markup.html.AjaxLink)2 AjaxSubmitLink (org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink)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