try {
Iterator inputs = result.getFormInputResults();
while (inputs.hasNext()) {
FormInputResult inputResult = (FormInputResult)inputs.next();
FormInput input = inputResult.getFormInput();
Object value = inputResult.format(request);
if (input.isArray()) {
values._setInputs(input.getName(), (String[])value);
} else {
values._setInput(input.getName(), (String)value);
}