Package com.cosmo.ui.controls

Examples of com.cosmo.ui.controls.DynamicMessageControl


      XhtmlControl xhtml = new XhtmlControl(getWorkspace());
      xhtml.append("Per consultar el contingut de les dades que s'introdueixen en aquest formulari, consultar l'exemple de Grid Control.");
      pc.addContent(xhtml, ContentColumns.MAIN);

      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);
         msg.setVisible(true);
         msg.setType(DynamicMessageControl.MessageTypes.Error);
         msg.setMessage("ERROR: " + ex.getMessage());
      }

      return pc;
   }
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

      HeaderControl header = new HeaderControl(getWorkspace());
      header.setTitle("Gesti� d'usuaris");
      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 compte", "UserRegisterPage", Icon.ICON_IMAGE_PLUS));
      btnBar.addButton(new ButtonBarItem("Refrescar", "UserManagerPage", Icon.ICON_IMAGE_REFRESH));
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

      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());
      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

      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

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.