Package com.cosmo.ui.controls

Examples of com.cosmo.ui.controls.DynamicMessageControl


      HeaderControl header = new HeaderControl(getWorkspace());
      header.setTitle("Server Status");
      header.setDescription("Cosmo Server status and configuration information.");
      pc.addContent(header, ContentColumns.MAIN);
     
      DynamicMessageControl msg = new DynamicMessageControl(getWorkspace(), ID_MSG);
      msg.setVisible(false);
      pc.addContent(msg, ContentColumns.MAIN);
     
      GridControl grid = new GridControl(getWorkspace(), ID_GRID);
      grid.setTitle("User control data (Session Cache)");
      grid.setFirstRowTitles(true);
View Full Code Here


         grid.setData(gd);
         // grid.setData(request, gd);
      }
      catch (Exception ex)
      {
         DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(ID_MSG);
         msg.setVisible(true);
         msg.setType(DynamicMessageControl.MessageTypes.Error);
         msg.setMessage("ERROR: " + ex.getMessage());
      }
     
      return pc;
   }
View Full Code Here

      HeaderControl header = new HeaderControl(getWorkspace());
      header.setTitle("Form Control");
      header.setDescription("Exemple de formulari. Per consultar el contingut de les dades que s'introdueixen en aquest formulari, consultar l'exemple de Grid Control.");
      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"));
View Full Code Here

         response.sendRedirect("GridPage");
      }
      catch (Exception ex)
      {
         DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(ID_MSG);
         msg.setVisible(true);
         msg.setType(DynamicMessageControl.MessageTypes.Error);
         msg.setMessage("ERROR: " + ex.getMessage());
      }
     
      return pc;
   }
View Full Code Here

      pc.addContent(xInfo, ContentColumns.MAIN);
     
      XhtmlControl xAuthent = new XhtmlControl(getWorkspace(), "xAuthent");
      pc.addContent(xAuthent, ContentColumns.MAIN);
     
      DynamicMessageControl xMsgAuthent = new DynamicMessageControl(getWorkspace(), "xMsgAuthent");
      pc.addContent(xMsgAuthent, ContentColumns.MAIN);
     
      XhtmlControl xAutho = new XhtmlControl(getWorkspace(), "xAutho");
      pc.addContent(xAutho, ContentColumns.MAIN);

      DynamicMessageControl xMsgAutho = new DynamicMessageControl(getWorkspace(), "xMsgAutho");
      pc.addContent(xMsgAutho, ContentColumns.MAIN);
     
      return pc;
   }
View Full Code Here

                     appendUnorderedList(lst, "alt");
         }
      }
      catch (Exception ex)
      {
         DynamicMessageControl xMsgAuthent = (DynamicMessageControl) pc.getControl("xMsgAuthent");
         xMsgAuthent.setMessage(ex.getMessage());
         xMsgAuthent.setType(MessageTypes.Error);
         xMsgAuthent.setVisible(true);
      }
     
      try
      {
         if (getWorkspace().isValidUserSession())
         {
            // Obtiene el agente de autenticaci�n
            Authorization autho = AuthorizationFactory.getInstance(getWorkspace());
           
            lst = new ArrayList<String>();
            lst.add("Classe: //" + autho.getClass().getName() + "//");
            for (Entry<String, String> entry : autho.getParameters().entrySet())
            {
               lst.add(entry.getKey() + ": '''" + entry.getValue() + "'''");
            }
           
            XhtmlControl xAutho = (XhtmlControl) pc.getControl("xAutho");
            xAutho.clear();
            xAutho.appendHeadder(Icon.render(Icon.ICON_IMAGE_COG) + " Agent d'autoritzaci�", 4).
                   appendParagraph("La seg�ent informaci� fa refer�ncia a l'agent d'autoritzaci� configurat actualment:").
                   appendUnorderedList(lst, "alt");
         }
      }
      catch (Exception ex)
      {
         DynamicMessageControl xMsgAutho = (DynamicMessageControl) pc.getControl("xMsgAutho");
         xMsgAutho.setMessage(ex.getMessage());
         xMsgAutho.setType(MessageTypes.Error);
         xMsgAutho.setVisible(true);
      }
     
      return pc;
   }
View Full Code Here

      HeaderControl header = new HeaderControl(getWorkspace(), "hc");
      header.setTitle("Login");
      header.setDescription("Para acceder a este contenido debe proporcionar sus credenciales de usuario.");
      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");
View Full Code Here

         response.sendRedirect(HttpRequestUtils.getValue(request, Cosmo.URL_PARAM_TOURL));
      }
      catch (UserNotFoundException ex)
      {
         DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(ID_MSG);
         msg.setVisible(true);
         msg.setType(DynamicMessageControl.MessageTypes.Error);
         msg.setMessage("Les credencials proporcionades no corresponen a cap usuari. �s possible que l'usuari no existeixi o b� que la contrassenya proporcionada sigui incorrecte.");
      }
      catch (Exception ex)
      {
         DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(ID_MSG);
         msg.setVisible(true);
         msg.setType(DynamicMessageControl.MessageTypes.Error);
         msg.setMessage("ERROR: " + ex.getMessage());
      }
     
      return pc;
   }
View Full Code Here

      HeaderControl header = new HeaderControl(getWorkspace());
      header.setTitle("Grid / Formularis");
      header.setDescription("Exemple d'utilitzaci� combinada del control GridControl i FormControl.");
      pc.addContent(header, ContentColumns.MAIN);
     
      DynamicMessageControl msg = new DynamicMessageControl(getWorkspace(), ID_MSG);
      msg.setVisible(false);
      pc.addContent(msg, ContentColumns.MAIN);
     
      ButtonBarControl btnBar = new ButtonBarControl(getWorkspace());
      btnBar.addButton(new ButtonBarItem("Nou registre", "FormPage", Icon.ICON_IMAGE_PLUS));
      btnBar.addButton(new ButtonBarItem("Refrescar", "GridPage", Icon.ICON_IMAGE_REFRESH));
View Full Code Here

         // grid.setData(request, gd);
         grid.setData(gd);
      }
      catch (Exception ex)
      {
         DynamicMessageControl msg = (DynamicMessageControl) pc.getControl(ID_MSG);
         msg.setVisible(true);
         msg.setType(DynamicMessageControl.MessageTypes.Error);
         msg.setMessage("ERROR: " + ex.getMessage());
      }
     
      return pc;
   }
View Full Code Here

TOP

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

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.