public ActionForward viewMonitorServiceTemplate(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   String templateId = request.getParameter("templateId");
   MonitorServiceTemplate monitorServiceTemplate =
       templateService.findMonitorServiceTemplateById(Integer.valueOf(templateId));
   DependencyUtil.initDependencyProperty(monitorServiceTemplate);
   ((DynaActionForm) form).set("monitorServiceTemplate", monitorServiceTemplate);
   return mapping.findForward("view");
 }
 public ActionForward viewMonitorService(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws Exception {
   String id = request.getParameter("id");
   MonitorService monitorService =
       monitorHostserviceService.getMonitorService(Integer.valueOf(id));
   DependencyUtil.initDependencyProperty(monitorService);
   ((DynaActionForm) form).set("monitorService", monitorService);
   return mapping.findForward("view");
 }
  public ActionForward editMonitorServiceTemplate(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    String templateId = request.getParameter("templateId");
    MonitorServiceTemplate monitorServiceTemplate =
        templateService.findMonitorServiceTemplateById(Integer.valueOf(templateId));
    DependencyUtil.initDependencyProperty(monitorServiceTemplate);
    List monitorTimePeriods = templateService.findAllMonitorTimePeriods();
    List monitorContactgroups = monitorSupportService.findAllMonitorContactgroups();
    List serviceCommands = monitorSupportService.findMonitorCommands(Integer.valueOf(2));
    ((DynaActionForm) form).set("monitorServiceTemplate", monitorServiceTemplate);
    ((DynaActionForm) form).set("type", "edit");
    request.getSession().setAttribute("monitorTimePeriods", monitorTimePeriods);
    request.getSession().setAttribute("monitorContactgroups", monitorContactgroups);
    request.getSession().setAttribute("serviceCommands", serviceCommands);

    return mapping.findForward("input");
  }