use of com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnBlurAjaxFormUpdatingBehaviour in project midpoint by Evolveum.
the class ParameterPropertiesPopupPanel method addTextPanel.
private void addTextPanel(String id, String expression) {
TextPanel<String> keyPanel = new TextPanel<>(id, new PropertyModel<>(getModel(), expression));
keyPanel.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
add(keyPanel);
}
use of com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnBlurAjaxFormUpdatingBehaviour in project midpoint by Evolveum.
the class RunReportPopupPanel method createTypedInputPanel.
private InputPanel createTypedInputPanel(String componentId, IModel<JasperReportValueDto> model, String expression, JasperReportParameterDto param) {
InputPanel panel;
Class<?> type;
try {
if (param.isMultiValue()) {
type = param.getNestedType();
} else {
type = param.getType();
}
} catch (ClassNotFoundException e) {
getSession().error("Could not find parameter type definition. Check the configuration.");
throw new RestartResponseException(getPageBase());
}
if (type.isEnum()) {
panel = WebComponentUtil.createEnumPanel(type, componentId, new PropertyModel<>(model, expression), this);
} else if (XMLGregorianCalendar.class.isAssignableFrom(type)) {
panel = new DatePanel(componentId, new PropertyModel<>(model, expression));
} else if (param.getProperties() != null && param.getProperties().getTargetType() != null) {
// render autocomplete box
LookupTableType lookup = new LookupTableType();
panel = new AutoCompleteTextPanel<String>(componentId, new LookupPropertyModel<>(model, expression, lookup, false), String.class) {
@Override
public Iterator<String> getIterator(String input) {
return prepareAutoCompleteList(input, lookup, param).iterator();
}
};
} else {
panel = new TextPanel<>(componentId, new PropertyModel<>(model, expression), type);
}
List<FormComponent> components = panel.getFormComponents();
for (FormComponent component : components) {
component.add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
}
panel.setOutputMarkupId(true);
return panel;
}
Aggregations