Search in sources :

Example 1 with TextAreaFormGroup

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

the class RichHyperlinkConfigDialog method initLayout.

private void initLayout(WebMarkupContainer content) {
    Form form = new Form(ID_MAIN_FORM);
    form.setOutputMarkupId(true);
    content.add(form);
    TextFormGroup name = new TextFormGroup(ID_LABEL, new PropertyModel<String>(model, RichHyperlinkType.F_LABEL.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.label"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    form.add(name);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, new PropertyModel<String>(model, RichHyperlinkType.F_DESCRIPTION.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.description"), ID_LABEL_SIZE, ID_INPUT_SIZE);
    description.setVisible(!isMenuItem);
    form.add(description);
    TextFormGroup targetUrl = new TextFormGroup(ID_TARGET_URL, new PropertyModel<String>(model, RichHyperlinkType.F_TARGET_URL.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.targetUrl"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(targetUrl);
    TextFormGroup color = new TextFormGroup(ID_COLOR, new PropertyModel<String>(model, RichHyperlinkType.F_COLOR.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.color"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    color.setVisible(!isMenuItem);
    form.add(color);
    MultiValueTextFormGroup authorizations = new MultiValueTextFormGroup(ID_AUTHORIZATION, new PropertyModel<List<String>>(model, RichHyperlinkType.F_AUTHORIZATION.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.authorization"), ID_LABEL_SIZE, ID_MULTIPLE_INPUT_SIZE, false);
    authorizations.setVisible(!isMenuItem);
    form.add(authorizations);
    TextFormGroup icon = new TextFormGroup(ID_ICON, new PropertyModel<String>(model, RichHyperlinkType.F_ICON.getLocalPart() + "." + IconType.F_CSS_CLASS.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.icon"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(icon);
    initButtons(form);
}
Also used : TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) MultiValueTextFormGroup(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextFormGroup) MultiValueTextFormGroup(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextFormGroup) Form(org.apache.wicket.markup.html.form.Form) List(java.util.List) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup)

Example 2 with TextAreaFormGroup

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

the class RichHyperlinkConfigPanel method initLayout.

private void initLayout() {
    Form form = new Form(ID_MAIN_FORM);
    form.setOutputMarkupId(true);
    add(form);
    TextFormGroup name = new TextFormGroup(ID_LABEL, new PropertyModel<String>(model, RichHyperlinkType.F_LABEL.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.label"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    form.add(name);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, new PropertyModel<String>(model, RichHyperlinkType.F_DESCRIPTION.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.description"), ID_LABEL_SIZE, ID_INPUT_SIZE);
    description.setVisible(!isMenuItem);
    form.add(description);
    TextFormGroup targetUrl = new TextFormGroup(ID_TARGET_URL, new PropertyModel<String>(model, RichHyperlinkType.F_TARGET_URL.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.targetUrl"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(targetUrl);
    TextFormGroup color = new TextFormGroup(ID_COLOR, new PropertyModel<String>(model, RichHyperlinkType.F_COLOR.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.color"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    color.setVisible(!isMenuItem);
    form.add(color);
    MultiValueTextFormGroup authorizations = new MultiValueTextFormGroup(ID_AUTHORIZATION, new PropertyModel<List<String>>(model, RichHyperlinkType.F_AUTHORIZATION.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.authorization"), ID_LABEL_SIZE, ID_MULTIPLE_INPUT_SIZE, false);
    authorizations.setVisible(!isMenuItem);
    form.add(authorizations);
    TextFormGroup icon = new TextFormGroup(ID_ICON, new PropertyModel<String>(model, RichHyperlinkType.F_ICON.getLocalPart() + "." + IconType.F_CSS_CLASS.getLocalPart()), createStringResource("RichHyperlinkConfigDialog.icon"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(icon);
    initButtons(form);
}
Also used : TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) MultiValueTextFormGroup(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextFormGroup) MultiValueTextFormGroup(com.evolveum.midpoint.web.component.form.multivalue.MultiValueTextFormGroup) Form(org.apache.wicket.markup.html.form.Form) List(java.util.List) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup)

Example 3 with TextAreaFormGroup

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

the class ReportConfigurationPanel method initLayout.

protected void initLayout() {
    TextFormGroup name = new TextFormGroup(ID_NAME, new PropertyModel<String>(getModel(), ID_NAME), createStringResource("ObjectType.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    add(name);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, new PropertyModel<String>(getModel(), ID_DESCRIPTION), createStringResource("ObjectType.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    add(description);
    IModel choices = WebComponentUtil.createReadonlyModelFromEnum(ExportType.class);
    IChoiceRenderer renderer = new EnumChoiceRenderer();
    DropDownFormGroup exportType = new DropDownFormGroup(ID_EXPORT_TYPE, new PropertyModel<ExportType>(getModel(), ReportDto.F_EXPORT_TYPE), choices, renderer, createStringResource("ReportType.export"), ID_LABEL_SIZE, ID_INPUT_SIZE, true);
    add(exportType);
    TextFormGroup virtualizerKickOn = null;
    DropDownFormGroup virtualizer = new DropDownFormGroup(ID_VIRTUALIZER, new PropertyModel<String>(getModel(), ReportDto.F_VIRTUALIZER), createVirtualizerListModel(), new ChoiceRenderer<String>(), createStringResource("ReportType.virtualizer"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    //virtualizer.add(new VirtualizerAjaxFormUpdatingBehaviour(virtualizerKickOn));
    add(virtualizer);
    virtualizerKickOn = new TextFormGroup(ID_VIRTUALIZER_KICKON, new PropertyModel<String>(getModel(), ReportDto.F_VIRTUALIZER_KICKON), createStringResource("ReportType.virtualizerKickOn"), ID_LABEL_SIZE, "col-md-4", false);
    add(virtualizerKickOn);
    TextFormGroup maxPages = new TextFormGroup(ID_MAXPAGES, new PropertyModel<String>(getModel(), ReportDto.F_MAXPAGES), createStringResource("ReportType.maxPages"), ID_LABEL_SIZE, "col-md-4", false);
    add(maxPages);
    TextFormGroup timeout = new TextFormGroup(ID_TIMEOUT, new PropertyModel<String>(getModel(), ReportDto.F_TIMEOUT), createStringResource("ReportType.timeout"), ID_LABEL_SIZE, "col-md-4", false);
    add(timeout);
}
Also used : IChoiceRenderer(org.apache.wicket.markup.html.form.IChoiceRenderer) TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) IModel(org.apache.wicket.model.IModel) DropDownFormGroup(com.evolveum.midpoint.web.component.form.DropDownFormGroup) EnumChoiceRenderer(org.apache.wicket.markup.html.form.EnumChoiceRenderer) ExportType(com.evolveum.midpoint.xml.ns._public.common.common_3.ExportType) PropertyModel(org.apache.wicket.model.PropertyModel) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup)

Example 4 with TextAreaFormGroup

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

the class ExpressionVariableEditorDialog method initLayout.

public void initLayout(WebMarkupContainer content) {
    Form form = new MidpointForm(ID_MAIN_FORM);
    form.setOutputMarkupId(true);
    content.add(form);
    // TODO - shouldn't this be some AutoCompleteField? If yer, where do we
    // get value?
    TextFormGroup name = new TextFormGroup(ID_NAME, new PropertyModel<>(model, ExpressionVariableDefinitionTypeDto.F_VARIABLE + ".name.localPart"), createStringResource("ExpressionVariableEditor.label.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(name);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, new PropertyModel<>(model, ExpressionVariableDefinitionTypeDto.F_VARIABLE + ".description"), createStringResource("ExpressionVariableEditor.label.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(description);
    TextFormGroup path = new TextFormGroup(ID_PATH, new PropertyModel<>(model, ExpressionVariableDefinitionTypeDto.F_PATH), createStringResource("ExpressionVariableEditor.label.path"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(path);
    DropDownFormGroup objectReference = new DropDownFormGroup<>(ID_OBJECT_REFERENCE, new PropertyModel<>(model, ExpressionVariableDefinitionTypeDto.F_VARIABLE + ".objectRef"), new IModel<List<ObjectReferenceType>>() {

        @Override
        public List<ObjectReferenceType> getObject() {
            return WebModelServiceUtils.createObjectReferenceList(ObjectType.class, getPageBase(), objectMap);
        }
    }, new ObjectReferenceChoiceRenderer(objectMap), createStringResource("ExpressionVariableEditor.label.objectRef"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(objectReference);
    TextAreaFormGroup value = new TextAreaFormGroup(ID_VALUE, new PropertyModel<>(model, ExpressionVariableDefinitionTypeDto.F_VALUE), createStringResource("ExpressionVariableEditor.label.value"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(value);
    AjaxSubmitButton cancel = new AjaxSubmitButton(ID_BUTTON_CANCEL, createStringResource("ExpressionVariableEditor.button.cancel")) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            cancelPerformed(target);
        }
    };
    form.add(cancel);
    AjaxSubmitButton save = new AjaxSubmitButton(ID_BUTTON_SAVE, createStringResource("ExpressionVariableEditor.button.apply")) {

        @Override
        protected void onSubmit(AjaxRequestTarget target) {
            savePerformed(target);
        }
    };
    form.add(save);
}
Also used : ObjectReferenceChoiceRenderer(com.evolveum.midpoint.web.component.input.ObjectReferenceChoiceRenderer) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) DropDownFormGroup(com.evolveum.midpoint.web.component.form.DropDownFormGroup) Form(org.apache.wicket.markup.html.form.Form) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ObjectType(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType) ArrayList(java.util.ArrayList) List(java.util.List)

Example 5 with TextAreaFormGroup

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

the class SynchronizationActionEditorDialog method initLayout.

private void initLayout(WebMarkupContainer content) {
    Form form = new MidpointForm(ID_MAIN_FORM);
    form.setOutputMarkupId(true);
    content.add(form);
    TextFormGroup name = new TextFormGroup(ID_NAME, new PropertyModel<>(model, SynchronizationActionTypeDto.F_ACTION_OBJECT + ".name"), createStringResource("SynchronizationActionEditorDialog.label.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(name);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, new PropertyModel<>(model, SynchronizationActionTypeDto.F_ACTION_OBJECT + ".description"), createStringResource("SynchronizationActionEditorDialog.label.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(description);
    DropDownFormGroup<SynchronizationActionTypeDto.HandlerUriActions> handlerUri = new DropDownFormGroup<SynchronizationActionTypeDto.HandlerUriActions>(ID_HANDLER_URI, new PropertyModel<>(model, SynchronizationActionTypeDto.F_HANDLER_URI), WebComponentUtil.createReadonlyModelFromEnum(SynchronizationActionTypeDto.HandlerUriActions.class), new EnumChoiceRenderer<>(this), createStringResource("SynchronizationActionEditorDialog.label.handlerUri"), createStringResource("SynchronizationStep.action.tooltip.handlerUri", WebComponentUtil.getMidpointCustomSystemName((PageResourceWizard) getPage(), "midpoint.default.system.name")), ID_LABEL_SIZE, ID_INPUT_SIZE, false, false) {

        @Override
        protected DropDownChoice createDropDown(String id, IModel<List<SynchronizationActionTypeDto.HandlerUriActions>> choices, IChoiceRenderer<SynchronizationActionTypeDto.HandlerUriActions> renderer, boolean required) {
            DropDownChoice choice = new DropDownChoice<>(id, getModel(), choices, renderer);
            choice.setNullValid(true);
            return choice;
        }
    };
    form.add(handlerUri);
    DropDownFormGroup<BeforeAfterType> order = new DropDownFormGroup<BeforeAfterType>(ID_ORDER, new PropertyModel<>(model, SynchronizationActionTypeDto.F_ACTION_OBJECT + ".order"), WebComponentUtil.createReadonlyModelFromEnum(BeforeAfterType.class), new EnumChoiceRenderer<>(this), createStringResource("SynchronizationActionEditorDialog.label.order"), createStringResource("SynchronizationStep.action.tooltip.order", WebComponentUtil.getMidpointCustomSystemName((PageResourceWizard) getPage(), "midpoint.default.system.name")), ID_LABEL_SIZE, ID_INPUT_SIZE, false, false) {

        @Override
        protected DropDownChoice createDropDown(String id, IModel<List<BeforeAfterType>> choices, IChoiceRenderer<BeforeAfterType> renderer, boolean required) {
            DropDownChoice choice = new DropDownChoice<>(id, getModel(), choices, renderer);
            choice.setNullValid(true);
            return choice;
        }
    };
    form.add(order);
    initButtons(form);
}
Also used : IChoiceRenderer(org.apache.wicket.markup.html.form.IChoiceRenderer) SynchronizationActionTypeDto(com.evolveum.midpoint.web.component.wizard.resource.dto.SynchronizationActionTypeDto) TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) IModel(org.apache.wicket.model.IModel) DropDownFormGroup(com.evolveum.midpoint.web.component.form.DropDownFormGroup) Form(org.apache.wicket.markup.html.form.Form) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) BeforeAfterType(com.evolveum.midpoint.xml.ns._public.common.common_3.BeforeAfterType) MidpointForm(com.evolveum.midpoint.web.component.form.MidpointForm) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice)

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