Search in sources :

Example 6 with TextAreaFormGroup

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

the class NameStep method initLayout.

private void initLayout() {
    parentPage.addEditingEnabledBehavior(this);
    TextFormGroup name = new TextFormGroup(ID_NAME, resourceNameModel, createStringResource("NameStep.name"), "col-md-3", "col-md-6", true);
    add(name);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, resourceDescriptionModel, createStringResource("NameStep.description"), "col-md-3", "col-md-6", false, 3);
    // parentPage.addEditingEnabledBehavior(description);
    add(description);
    DropDownFormGroup<PrismObject<ConnectorHostType>> hostDropDown = createHostDropDown();
    // parentPage.addEditingEnabledBehavior(hostDropDown);
    add(hostDropDown);
    DropDownFormGroup<PrismObject<ConnectorType>> connectorDropDown = createConnectorDropDown();
    // parentPage.addEditingEnabledBehavior(connectorDropDown);
    add(connectorDropDown);
}
Also used : PrismObject(com.evolveum.midpoint.prism.PrismObject) TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup)

Example 7 with TextAreaFormGroup

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

the class MultiplicityPolicyPanel method initLayout.

private void initLayout() {
    Form form = new MidpointForm(ID_MAIN_FORM);
    form.setOutputMarkupId(true);
    add(form);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, new PropertyModel<>(model, MultiplicityPolicyConstraintType.F_DESCRIPTION.getLocalPart()), createStringResource("multiplicityContainer.label.description"), ID_LABEL_SIZE, ID_INPUT_SIZE);
    form.add(description);
    WebMarkupContainer multiplicityContainer = new WebMarkupContainer(ID_MULTIPLICITY_CONTAINER);
    multiplicityContainer.setOutputMarkupId(true);
    form.add(multiplicityContainer);
    TextField<String> multiplicity = new TextField<>(ID_MULTIPLICITY, new PropertyModel<>(model, MultiplicityPolicyConstraintType.F_MULTIPLICITY.getLocalPart()));
    multiplicity.add(prepareMultiplicityValidator());
    multiplicity.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isEnabled() {
            return !unbounded;
        }
    });
    multiplicityContainer.add(multiplicity);
    CheckBox multiplicityUnbounded = new CheckBox(ID_MULTIPLICITY_UNBOUND, new PropertyModel<>(this, MULTIPLICITY_UNBOUNDED));
    multiplicityUnbounded.add(new OnChangeAjaxBehavior() {

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            model.getObject().setMultiplicity(MULTIPLICITY_UNBOUNDED);
            target.add(getMultiplicityContainer());
        }
    });
    multiplicityContainer.add(multiplicityUnbounded);
    initButtons(form);
}
Also used : Form(org.apache.wicket.markup.html.form.Form) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) OnChangeAjaxBehavior(org.apache.wicket.ajax.form.OnChangeAjaxBehavior) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) CheckBox(org.apache.wicket.markup.html.form.CheckBox) TextField(org.apache.wicket.markup.html.form.TextField) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)

Aggregations

TextAreaFormGroup (com.evolveum.midpoint.web.component.form.TextAreaFormGroup)7 TextFormGroup (com.evolveum.midpoint.web.component.form.TextFormGroup)6 Form (org.apache.wicket.markup.html.form.Form)5 DropDownFormGroup (com.evolveum.midpoint.web.component.form.DropDownFormGroup)3 MidpointForm (com.evolveum.midpoint.web.component.form.MidpointForm)3 List (java.util.List)3 MultiValueTextFormGroup (com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextFormGroup)2 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)2 IChoiceRenderer (org.apache.wicket.markup.html.form.IChoiceRenderer)2 IModel (org.apache.wicket.model.IModel)2 PrismObject (com.evolveum.midpoint.prism.PrismObject)1 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)1 ObjectReferenceChoiceRenderer (com.evolveum.midpoint.web.component.input.ObjectReferenceChoiceRenderer)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 SynchronizationActionTypeDto (com.evolveum.midpoint.web.component.wizard.resource.dto.SynchronizationActionTypeDto)1 BeforeAfterType (com.evolveum.midpoint.xml.ns._public.common.common_3.BeforeAfterType)1 ExportType (com.evolveum.midpoint.xml.ns._public.common.common_3.ExportType)1 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)1 ArrayList (java.util.ArrayList)1 OnChangeAjaxBehavior (org.apache.wicket.ajax.form.OnChangeAjaxBehavior)1