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

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


    // check to see if the user logged on is a member
    if (!adminSecurityCheck(request)) {
      return mapping.findForward(BaseConstants.FWD_ADMIN_LOGIN);
    }

    ScrollForm scrollForm = (ScrollForm) form;


    if (scrollForm.getType().equalsIgnoreCase("list")) {
      allScrolls = systemConfigService.getAllScrolls();
      setSessionObject(request, BaseConstants.LIST_OF_SCROLLS, allScrolls);
    }
    else if (scrollForm.getType().equalsIgnoreCase("update")) {
      systemConfigService.updateScroll(scrollForm.getScrollId(), getLastModifiedBy(request));
      sCtx.setAttribute(BaseConstants.SCROLL_VO, systemConfigService.getLatestScroll());
    }
    else if (scrollForm.getType().equalsIgnoreCase("new")) {
      ScrollVO scrollVO = new ScrollVO();
      BeanUtils.copyProperties(scrollVO, scrollForm);
      scrollVO.setLastModifiedBy(getLastModifiedBy(request));
      scrollVO.setScrollId(null);
      systemConfigService.addScroll(scrollVO);       
View Full Code Here


  // -------------------------------------------------------------------------------------------------

  public boolean adminMaintainScroll(Object bean, ValidatorAction va,
      Field field, ActionMessages messages, HttpServletRequest request) {

    ScrollForm scrollForm = (ScrollForm)bean;
    String scrollType = StringUtil.safeString(scrollForm.getType());
    String scrollText = StringUtil.safeString(scrollForm.getScrollText());
    String scrollid = StringUtil.safeString(scrollForm.getScrollId());

    if (!scrollType.equalsIgnoreCase("list")) {
      if (scrollType.equalsIgnoreCase("new") && scrollText.equalsIgnoreCase("")) {
        messages.add(field.getKey(), Resources.getActionMessage( request, va, field));
      } else if (scrollType.equalsIgnoreCase("update") && scrollid.equalsIgnoreCase("")) {
View Full Code Here

TOP

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

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.