Package com.cosmo.web.sample

Examples of com.cosmo.web.sample.WeatherManager


   @Override
   public PageContext formSendedEvent(PageContext pc, HttpServletRequest request, HttpServletResponse response)
   {
      DataAgent conn;
      WeatherManager wm;

      Weather weather = new Weather();
      weather.setCityName(HttpRequestUtils.getValue(request, "txtName"));
      weather.setTempMin(HttpRequestUtils.getInt(request, "txtTMin"));
      weather.setTempMax(HttpRequestUtils.getInt(request, "txtTMax"));
      weather.setPrecipitation(HttpRequestUtils.getInt(request, "txtPre"));

      try
      {
         conn = DataFactory.getInstance(getWorkspace());
         wm = new WeatherManager(conn);
         wm.add(weather);

         response.sendRedirect("GridPage");
      }
      catch (Exception ex)
      {
View Full Code Here


   @Override
   public PageContext loadPageEvent(PageContext pc, HttpServletRequest request, HttpServletResponse response)
   {
      DataAgent conn;
      WeatherManager wm;

      try
      {
         conn = DataFactory.getInstance(getWorkspace());
         wm = new WeatherManager(conn);

         GridData gd = new GridData();
         gd.setCells(wm.getAll(), true);

         GridControl grid = (GridControl) pc.getControl(ID_GRID);
         // grid.setData(request, gd);
         grid.setData(gd);
      }
View Full Code Here

  
   @Override
   public PageContext loadPageEvent(PageContext pc, HttpServletRequest request, HttpServletResponse response)
   {
      DataAgent conn;
      WeatherManager wm;
     
      try
      {
         conn = DataFactory.getInstance(getWorkspace(), "cosmo.server");
         wm = new WeatherManager(conn);
     
         GridData gd = new GridData();
         gd.setCells(wm.getAll(), true);
        
         GridControl grid = (GridControl) pc.getControl(ID_GRID);
         // grid.setData(request, gd);
         grid.setData(gd);
      }
View Full Code Here

   @Override
   public PageContext formSendedEvent(PageContext pc, HttpServletRequest request, HttpServletResponse response)
   {
      DataAgent conn;
      WeatherManager wm;
     
      Weather weather = new Weather();
      weather.setCityName(HttpRequestUtils.getValue(request, "txtName"));
      weather.setTempMin(HttpRequestUtils.getInt(request, "txtTMin"));
      weather.setTempMax(HttpRequestUtils.getInt(request, "txtTMax"));
      weather.setPrecipitation(HttpRequestUtils.getInt(request, "txtPre"));
     
      try
      {
         conn = DataFactory.getInstance(getWorkspace(), "cosmo.server");

         wm = new WeatherManager(conn);
         wm.add(weather);

         response.sendRedirect("GridPage");
      }
      catch (Exception ex)
      {
View Full Code Here

TOP

Related Classes of com.cosmo.web.sample.WeatherManager

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.