Package com.arrgsocal.entities

Examples of com.arrgsocal.entities.Event


  @EJB
  EventManager eventManager;
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    int id = Integer.parseInt(request.getParameter("id"));
   
    Event e = eventManager.getEvent(id);
    if (e == null){
      response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Entity not found");
    }
    request.setAttribute("event", e);
    getServletContext().getRequestDispatcher("/WEB-INF/.jsp").forward(request, response);
View Full Code Here


    try
    {
      id = Integer.parseInt(request.getParameter("id"));
      if (request.getParameter("update") != null)
      {
        Event e = eventManager.getEvent(id);
        e.setTitle(request.getParameter("title"));
        e.setDescription(request.getParameter("description"));
        e.setRecurrance(Integer.parseInt(request.getParameter("recurrance")));
        eventManager.update(e);
      }
      else if (request.getParameter("delete") != null)
      {
        eventManager.delete(id);
View Full Code Here

      request.setAttribute("errors", errors);
      request.getRequestDispatcher("/WEB-INF/.jsp").forward(request, response);
      return;
    }
   
    Event e = new Event();
    e.setStartDate(startDate);
    e.setEndDate(endDate);
    e.setTitle(title);
    e.setDescription(description);
    e.setRecurrance(recurrance);
   
    response.sendRedirect("./");
  }
View Full Code Here

TOP

Related Classes of com.arrgsocal.entities.Event

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.