Package com.cosmo.util

Examples of com.cosmo.util.FormData


    * @throws FieldNotFoundException
    */
   public void setFieldValue(HttpServletRequest request, String name, String value) throws FieldNotFoundException
   {
      FormField field;
      FormData data = null;

      // Obtiene el contenedor de valores
      data = (FormData) request.getSession().getAttribute(this.getSessionControlDataKey());

      // Si no estaba definido, lo crea
      if (data == null)
      {
         data = new FormData(this.getId());
      }

      // Almacena el valor y se asegura que el campo exista
      for (FormFieldset group : this.groups)
      {
         Iterator<FormField> it = group.getFields();
         while (it.hasNext())
         {
            field = it.next();
            if (field.getName().equals(name))
            {
               data.addParameterValue(name, value);
               return;
            }
         }
      }

View Full Code Here


    * @return Una instancia de {@link FormData} que contiene los datos del formulario.
    */
   public FormData setFormValues(HttpServletRequest request)
   {
      FormField field;
      FormData data = new FormData(this.getId());

      for (FormFieldset group : this.groups)
      {
         Iterator<FormField> it = group.getFields();
         while (it.hasNext())
         {
            field = it.next();
            data.addParameterValue(field.getName(), request.getParameter(field.getName()));
         }
      }

      // Almacena los valores en la sessi�n
      request.getSession().setAttribute(this.getSessionControlDataKey(), data);
View Full Code Here

TOP

Related Classes of com.cosmo.util.FormData

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.