Search in sources :

Example 16 with TextArea

use of org.apache.wicket.markup.html.form.TextArea in project midpoint by Evolveum.

the class PageResourceVisualization method initLayout.

private void initLayout() {
    Form form = new Form(ID_FORM);
    add(form);
    WebMarkupContainer dotContainer = new WebMarkupContainer(ID_DOT_CONTAINER);
    dotContainer.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return visualizationModel.getObject().getSvg() == null;
        }
    });
    form.add(dotContainer);
    TextArea<String> dot = new TextArea<>(ID_DOT, new PropertyModel<String>(visualizationModel, ResourceVisualizationDto.F_DOT));
    dotContainer.add(dot);
    Label error = new Label(ID_ERROR, new PropertyModel<String>(visualizationModel, ResourceVisualizationDto.F_EXCEPTION_AS_STRING));
    dotContainer.add(error);
    Label svg = new Label(ID_SVG, new PropertyModel<String>(visualizationModel, ResourceVisualizationDto.F_SVG));
    svg.setEscapeModelStrings(false);
    svg.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return visualizationModel.getObject().getSvg() != null;
        }
    });
    form.add(svg);
    AjaxSubmitButton back = new AjaxSubmitButton(ID_BACK) {

        @Override
        public void onSubmit(AjaxRequestTarget ajaxRequestTarget, org.apache.wicket.markup.html.form.Form<?> form) {
            redirectBack();
        }

        @Override
        protected void onError(AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) {
            target.add(getFeedbackPanel());
        }
    };
    form.add(back);
}
Also used : AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) Form(com.evolveum.midpoint.web.component.form.Form) TextArea(org.apache.wicket.markup.html.form.TextArea) Label(org.apache.wicket.markup.html.basic.Label) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)

Example 17 with TextArea

use of org.apache.wicket.markup.html.form.TextArea in project midpoint by Evolveum.

the class QueryBasedHandlerPanel method initLayout.

private void initLayout() {
    WebMarkupContainer objectTypeContainer = new WebMarkupContainer(ID_OBJECT_TYPE_CONTAINER);
    Label objectType = new Label(ID_OBJECT_TYPE, new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            final String key = getModelObject().getObjectTypeKey();
            return key != null ? getString(key) : null;
        }
    });
    objectTypeContainer.add(objectType);
    add(objectTypeContainer);
    WebMarkupContainer objectQueryContainer = new WebMarkupContainer(ID_OBJECT_QUERY_CONTAINER);
    TextArea objectQuery = new TextArea<>(ID_OBJECT_QUERY, new PropertyModel<>(getModel(), QueryBasedHandlerDto.F_OBJECT_QUERY));
    objectQuery.setEnabled(false);
    objectQueryContainer.add(objectQuery);
    add(objectQueryContainer);
}
Also used : TextArea(org.apache.wicket.markup.html.form.TextArea) Label(org.apache.wicket.markup.html.basic.Label) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Aggregations

TextArea (org.apache.wicket.markup.html.form.TextArea)17 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)13 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)10 Label (org.apache.wicket.markup.html.basic.Label)10 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)9 List (java.util.List)5 PropertyModel (org.apache.wicket.model.PropertyModel)5 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)4 AjaxFormComponentUpdatingBehavior (org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior)4 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)3 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)3 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)3 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)2 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)2 AceEditor (com.evolveum.midpoint.web.component.AceEditor)2 DateInput (com.evolveum.midpoint.web.component.DateInput)2 Form (com.evolveum.midpoint.web.component.form.Form)2 InlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)2 InlineMenuItemAction (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItemAction)2 InfoTooltipBehavior (com.evolveum.midpoint.web.util.InfoTooltipBehavior)2