Package com.cosmo.ui.controls

Examples of com.cosmo.ui.controls.FormControl


         }

         // Seg�n el comando, realiza una acci�n. Si no hay comando, muestra el grid
         if (HttpRequestUtils.getValue(request, PARAMETER_COMMAND, "").equals(COMMAND_CREATE))
         {
            FormControl form = new FormControl(getWorkspace(), app.getId());
            form.addGroup(cls);
            form.addHiddenValue(new FormFieldHidden(PARAMETER_APPID, HttpRequestUtils.getValue(request, PARAMETER_APPID)));
            form.addHiddenValue(new FormFieldHidden(PARAMETER_COMMAND, HttpRequestUtils.getValue(request, PARAMETER_COMMAND)));
            pc.addContent(form, ContentColumns.MAIN);
         }
         else if (HttpRequestUtils.getValue(request, PARAMETER_COMMAND, "").equals(COMMAND_EDIT))
         {
            Object instance = OrmFactory.getObjectFromRequest(cls, request);

            OrmFactory ormp = new OrmFactory(app.getConnectionId(), getWorkspace());
            instance = ormp.get(instance);

            FormControl form = new FormControl(getWorkspace(), app.getId());
            form.addGroup(instance);
            form.addHiddenValue(new FormFieldHidden(PARAMETER_APPID, HttpRequestUtils.getValue(request, PARAMETER_APPID)));
            form.addHiddenValue(new FormFieldHidden(PARAMETER_COMMAND, HttpRequestUtils.getValue(request, PARAMETER_COMMAND)));
            pc.addContent(form, ContentColumns.MAIN);
         }
         else
         {
            // Muestra el GRID de la aplicaci�n
View Full Code Here


            DynamicMessageControl msg = new DynamicMessageControl(getWorkspace(), "msg");
            msg.setVisible(false);
            pc.addContent(msg, ContentColumns.MAIN);

            FormControl form = new FormControl(getWorkspace(), "UserRegisterForm");
            form.setName("frmUserAdd");
            form.setTitle("Nou compte d'usuari");

            FormFieldset grpId = new FormFieldset("Identificaci�");
            grpId.addField(new FormFieldText(FIELD_LOGIN, "Login", 35));
            grpId.addField(new FormFieldText(FIELD_PASSWORD, "Contrassenya", 32, true));
            grpId.addField(new FormFieldText(FIELD_PASSWORDVER, "Verificaci�", 32, true));
            grpId.addField(new FormFieldText(FIELD_MAIL, "Correu-e", 255));
            form.addGroup(grpId);

            FormFieldset grpDat = new FormFieldset("Dades personals");
            grpDat.addField(new FormFieldText(FIELD_NAME, "Nom complert", 64));
            form.addGroup(grpDat);

            form.addButton(new FormButton("cmdSend", "Aceptar", FormButton.ButtonType.Submit));
            form.addButton(new FormButton("cmdCancel", "Cancel�lar", "UserManagerPage"));
            pc.addContent(form, ContentColumns.MAIN);
         }
      }
      catch (AuthenticationException e)
      {
View Full Code Here

      pc.addContent(header, ContentColumns.MAIN);

      DynamicMessageControl message = new DynamicMessageControl(getWorkspace(), ID_MSG);
      pc.addContent(message, ContentColumns.MAIN);

      FormControl form = new FormControl(getWorkspace(), "WeatherForm");
      FormFieldset group = new FormFieldset("Temps meteorol�gic", "Introdueixi les dades de registre meteorol�gic.", form);
      group.addField(new FormFieldText("txtName", "Ciutat"));
      group.addField(new FormFieldText("txtTMin", "Temperatura m�nima"));
      group.addField(new FormFieldText("txtTMax", "Temperatura m�xima"));
      group.addField(new FormFieldText("txtPre", "Precipitaci� mitja"));
      form.addGroup(group);
      form.addButton(new FormButton("cmdAcceopt", "Enviar", ButtonType.Submit));
      pc.addContent(form, ContentColumns.MAIN);

      return pc;
   }
View Full Code Here

      DynamicMessageControl message = new DynamicMessageControl(getWorkspace(), ID_MSG);
      pc.addContent(message, ContentColumns.MAIN);

      try
      {
         FormControl form = new FormControl(getWorkspace(), "OrmWeatherForm");
         form.addGroup(Weather.class);
         pc.addContent(form, ContentColumns.MAIN);
      }
      catch (InvalidMappingException ex)
      {
         DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(ID_MSG);
View Full Code Here

      FormFieldList formatList = new FormFieldList("cboFormat", "Format", request);
      formatList.addListOption(new KeyValue("pdf", "Adobe Acrobat (PDF)", true));
      formatList.addListOption(new KeyValue("docx", "Ms Word (DOCX)"));

      FormControl form = new FormControl(getWorkspace(), "rptForm");
      FormFieldset ffs = new FormFieldset("Report details");
      ffs.addField(new FormFieldText("txtTitle", "Title", 64, request));
      ffs.addField(formatList);
      form.addGroup(ffs);
      form.addButton(new FormButton("cmdReport", "Generate report", ButtonType.Submit));
      pc.addContent(form, ContentColumns.MAIN);

      return pc;
   }
View Full Code Here

      pc.addContent(header, ContentColumns.MAIN);

      DynamicMessageControl message = new DynamicMessageControl(getWorkspace(), ID_MSG);
      pc.addContent(message, ContentColumns.MAIN);

      FormControl form = new FormControl(getWorkspace(), "LoginForm");
      form.addHiddenValue(new FormFieldHidden(Cosmo.URL_PARAM_TOURL, HttpRequestUtils.getValue(request,
            Cosmo.URL_PARAM_TOURL)));
      FormFieldset group = new FormFieldset("Datos de identificaci�n");
      group.addField(new FormFieldText(LoginPage.FIELD_LOGIN, "Login"));
      group.addField(new FormFieldText(LoginPage.FIELD_PASSWORD, "Password", true));
      form.addGroup(group);
      form.addButton(new FormButton("cmdAcceopt", "Enviar", ButtonType.Submit));
      pc.addContent(form, ContentColumns.MAIN);

      return pc;
   }
View Full Code Here

       */

      DynamicMessageControl message = new DynamicMessageControl(getWorkspace(), ID_MSG);
      pc.addContent(message, ContentColumns.MAIN);

      FormControl form = new FormControl(getWorkspace(), "SendMessageForm");
      FormFieldset group = new FormFieldset("Enviar Missatge", "Introdueixi les dades del missatge que desitja enviar.",
            form);
      group.addField(new FormFieldText("txtName", "Nom del destinatari"));
      group.addField(new FormFieldText("txtMail", "Correu electr�nic"));
      group.addField(new FormFieldTextArea("txtBody", "Missatge"));
      form.addGroup(group);
      form.addButton(new FormButton("cmdAcceopt", "Enviar", ButtonType.Submit));
      pc.addContent(form, ContentColumns.MAIN);

      return pc;
   }
View Full Code Here

           
            DynamicMessageControl msg = new DynamicMessageControl(getWorkspace(), "msg");
            msg.setVisible(false);
            pc.addContent(msg, ContentColumns.MAIN);

            FormControl form = new FormControl(getWorkspace(), "UserRegisterForm");
            form.setName("frmUserAdd");
            form.setTitle("Nou compte d'usuari");

            FormFieldset grpId = new FormFieldset("Identificaci�");
            grpId.addField(new FormFieldText(FIELD_LOGIN, "Login", 35));
            grpId.addField(new FormFieldText(FIELD_PASSWORD, "Contrassenya", 32, true));
            grpId.addField(new FormFieldText(FIELD_PASSWORDVER, "Verificaci�", 32, true));
            grpId.addField(new FormFieldText(FIELD_MAIL, "Correu-e", 255));
            form.addGroup(grpId);

            FormFieldset grpDat = new FormFieldset("Dades personals");
            grpDat.addField(new FormFieldText(FIELD_NAME, "Nom complert", 64));
            form.addGroup(grpDat);
           
            form.addButton(new FormButton("cmdSend", "Aceptar", FormButton.ButtonType.Submit));
            form.addButton(new FormButton("cmdCancel", "Cancel�lar", "UserManagerPage"));
            pc.addContent(form, ContentColumns.MAIN);
         }
      }
      catch (AuthenticationException e)
      {
View Full Code Here

      pc.addContent(header, ContentColumns.MAIN);
     
      DynamicMessageControl message = new DynamicMessageControl(getWorkspace(), ID_MSG);
      pc.addContent(message, ContentColumns.MAIN);
     
      FormControl form = new FormControl(getWorkspace(), "WeatherForm");
      FormFieldset group = new FormFieldset("Temps meteorol�gic", "Introdueixi les dades de registre meteorol�gic.", form);
      group.addField(new FormFieldText("txtName", "Ciutat"));
      group.addField(new FormFieldText("txtTMin", "Temperatura m�nima"));
      group.addField(new FormFieldText("txtTMax", "Temperatura m�xima"));
      group.addField(new FormFieldText("txtPre", "Precipitaci� mitja"));
      form.addGroup(group);
      form.addButton(new FormButton("cmdAcceopt", "Enviar", ButtonType.Submit));
      pc.addContent(form, ContentColumns.MAIN);
     
      return pc;
   }
View Full Code Here

      pc.addContent(header, ContentColumns.MAIN);
     
      DynamicMessageControl message = new DynamicMessageControl(getWorkspace(), ID_MSG);
      pc.addContent(message, ContentColumns.MAIN);
     
      FormControl form = new FormControl(getWorkspace(), "LoginForm");
      form.addHiddenValue(new FormFieldHidden(Cosmo.URL_PARAM_TOURL, HttpRequestUtils.getValue(request, Cosmo.URL_PARAM_TOURL)));
      FormFieldset group = new FormFieldset("Datos de identificaci�n");
      group.addField(new FormFieldText(LoginPage.FIELD_LOGIN, "Login"));
      group.addField(new FormFieldText(LoginPage.FIELD_PASSWORD, "Password", true));
      form.addGroup(group);
      form.addButton(new FormButton("cmdAcceopt", "Enviar", ButtonType.Submit));
      pc.addContent(form, ContentColumns.MAIN);
     
      return pc;
   }
View Full Code Here

TOP

Related Classes of com.cosmo.ui.controls.FormControl

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.