Package de.odysseus.calyxo.forms

Examples of de.odysseus.calyxo.forms.Form.validate()


    if (form == null) {
      throw new ConfigException("No form for action '" + mapping.getPath() + "'");
    }
    ActionErrors errors = null;
    // execute validation
    FormResult result = form.validate(request, inputs);
    if (!result.isValid()) { // collect error messages
      errors = new ActionErrors();
      Messages messages = result.getMessages();
      Iterator names = messages.getKeys();
      while (names.hasNext()) {
View Full Code Here


    Form form = formsSupport.getForm(request, path);
    if (form == null) {
      throw new ServletException("Cannot find form for action '" + path);
    }
    FormInputValues formParams = new RequestInputValues(request);
    FormResult result = form.validate(request, formParams);
    request.setAttribute(FormsSupport.FORM_RESULT_KEY, result);
    if (result.isValid()) {
      log.debug("valid: yes");
      FormProperties properties = formsSupport.getFormProperties(request, path);
      if (properties != null && commit) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.