Package de.odysseus.calyxo.struts.forms.legacy

Examples of de.odysseus.calyxo.struts.forms.legacy.FlushableForm


      formData = support.getFormData(request, action, false);
    } catch (Exception e) {
      throw new JspException("Cannot get form data for action '" + action + "'!");
    }
    if (formData instanceof FlushableForm) {
      FlushableForm values = (FlushableForm)formData;
      FormResult result = support.getFormResult(request, action);
      if (result != null) {
        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);
            }
          }
        } catch (Exception e) {
          throw new JspException(e);
        }
      } else {
        Form form = support.getForm(request, action);
        if (form == null) {
          throw new JspException("Cannot find form for action '" + action + "'!");
        }
        try {
          Iterator inputs = form.getFormInputs();
          while (inputs.hasNext()) {
            FormInput input = (FormInput)inputs.next();
            Object value = input.format(request, formData);
            if (input.isArray()) {
              values._setInputs(input.getName(), (String[])value);
            } else {
              values._setInput(input.getName(), (String)value);
            }
          }
        } catch (Exception e) {
          throw new JspException(e);
        }
View Full Code Here

TOP

Related Classes of de.odysseus.calyxo.struts.forms.legacy.FlushableForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.