Package net.naijatek.myalumni.modules.common.presentation.form

Examples of net.naijatek.myalumni.modules.common.presentation.form.ClassNewsForm


        return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }   

    public ActionForward viewClassNews(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        logger.debug("in viewClassNews...");      
        ClassNewsForm classNewsForm = (ClassNewsForm) form;
        ClassNewsVO classNewsVO = new ClassNewsVO();
        classNewsVO = classNewsService.findById(classNewsForm.getClassNewsId());
        BeanUtils.copyProperties(classNewsForm, classNewsVO );
        return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }   
View Full Code Here


    public ActionForward updateClassNews(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        logger.debug("in updateClassNews...");
        if ( !isTokenValid(request) ) {
            return mapping.findForward(BaseConstants.FWD_INVALID_TOKEN);
        }         
        ClassNewsForm classNewsForm = (ClassNewsForm) form;
        ClassNewsVO classNewsVO = new ClassNewsVO();
        BeanUtils.copyProperties(classNewsVO, classNewsForm);
        classNewsVO.setLastModifiedBy(getLastModifiedBy(request));
        classNewsService.merge(classNewsVO);
        getClassNewsHelper(request);
View Full Code Here

            return mapping.findForward(BaseConstants.FWD_INVALID_TOKEN);
        }         
    if (!adminSecurityCheck(request)) {
      return mapping.findForward(BaseConstants.FWD_ADMIN_LOGIN);
    }       
        ClassNewsForm classNewsForm = (ClassNewsForm) form;
        ClassNewsVO classNewsVO = new ClassNewsVO();
        BeanUtils.copyProperties(classNewsVO, classNewsForm);
        classNewsVO.setLastModifiedBy(getLastModifiedBy(request));
        classNewsVO.setAuthorId(getCurrentUserId(request));
        classNewsService.save(classNewsVO);
View Full Code Here

   
   
    public ActionForward prepareUpdateClassNews(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        logger.debug("in prepareUpdateClassNews...");   
        saveToken(request);
        ClassNewsForm classNewsForm = (ClassNewsForm) form;
        ClassNewsVO classNewsVO = classNewsService.findById(classNewsForm.getClassNewsId());
        BeanUtils.copyProperties(classNewsForm, classNewsVO);
        getClassNewsHelper(request);
        return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }
View Full Code Here

    public ActionForward deleteClassNews(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        logger.debug("in deleteClassNews...")
    if (!adminSecurityCheck(request)) {
      return mapping.findForward(BaseConstants.FWD_ADMIN_LOGIN);
    }       
        ClassNewsForm classNewsForm = (ClassNewsForm) form;
        classNewsService.softDelete(classNewsForm.getClassNewsId(), getLastModifiedBy(request));
        getClassNewsHelper(request);
        return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }
View Full Code Here

        // check to see if the user logged on is a member
        if (!memberSecurityCheck(request, token)) {
          return mapping.findForward(BaseConstants.FWD_LOGIN);
        }
       
        ClassNewsForm cnForm =  (ClassNewsForm)form;
     
      cnForm.setFromClassYear(String.valueOf(token.getYearIn()));
      cnForm.setToClassYear(String.valueOf(token.getYearOut()));
     
      return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }
View Full Code Here

     
      if (isCancelled(request)){
        return mapping.findForward(BaseConstants.FWD_CANCEL);
      }
     
      ClassNewsForm cnForm =  (ClassNewsForm)form;
      ClassNewsVO cnVO = new ClassNewsVO();  

      BeanUtils.copyProperties(cnVO, cnForm);
      cnVO.setLastModifiedBy(getLastModifiedBy(request));
      cnVO.setAuthorId(getCurrentUserId(request));
View Full Code Here

                                       HttpServletRequest request,
                                       HttpServletResponse response) throws
        Exception {

      logger.debug("in viewClassNews");
      ClassNewsForm cnForm =  (ClassNewsForm)form;
      ClassNewsVO cnVO = new ClassNewsVO();  
     
      cnVO = classNewsService.findById(cnForm.getClassNewsId());
      BeanUtils.copyProperties(cnForm, cnVO);
      return mapping.findForward(BaseConstants.FWD_SUCCESS);
    }      
View Full Code Here

   * @return boolean
   */
  public boolean compareClassNewsYear(Object bean, ValidatorAction va, Field field,
      ActionMessages messages, HttpServletRequest request) {

    ClassNewsForm classForm = (ClassNewsForm)bean;

    int fromClassYear = 0;
    int toClassYear = 0;
   
    String strFromClassYear = StringUtil.safeString(classForm.getFromClassYear());
    String strToClassYear = StringUtil.safeString(classForm.getToClassYear());


    fromClassYear = Integer.parseInt(strFromClassYear);
    toClassYear = Integer.parseInt(strToClassYear);

View Full Code Here

TOP

Related Classes of net.naijatek.myalumni.modules.common.presentation.form.ClassNewsForm

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.