if (localeStr != null)
locale = I18nUtils.parseLocale(localeStr, locale);
Source source = resolver.resolveURI(formSource);
try {
Form form = formManager.createForm(source);
Request request = ObjectModelHelper.getRequest(objectModel);
FormHandler formHandler = null;
if (formHandlerClassName != null) {
// TODO cache these classes
Class clazz = Class.forName(formHandlerClassName);
formHandler = (FormHandler)clazz.newInstance();
LifecycleHelper.setupComponent(formHandler, null, null, manager, null, null, null);
formHandler.setup(form);
form.setFormHandler(formHandler);
}
FormContext formContext = new FormContext(request, locale);
boolean finished = form.process(formContext);
request.setAttribute(formAttribute, form);
if (finished)
return Collections.EMPTY_MAP;
else