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);
}
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);
}
Aggregations