Package org.apache.struts.action

Examples of org.apache.struts.action.ActionForward


  @Test
  public void testValidBindingForm()
  {

    ActionForward actionForward = new ActionForward();

    NavigableFormSubmitBean actionBean = createStrictMock(NavigableFormSubmitBean.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    DelegatingForm form = createStrictMock(DelegatingForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
View Full Code Here


  @Test
  public void testCancelValidBindingForm()
  {

    ActionForward actionForward = new ActionForward();

    NavigableFormSubmitBean actionBean = createStrictMock(NavigableFormSubmitBean.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    DelegatingForm form = createStrictMock(DelegatingForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
View Full Code Here

  @Test
  public void testRegularForm()
  {

    ActionForward actionForward = new ActionForward();

    NavigableFormSubmitBean actionBean = createStrictMock(NavigableFormSubmitBean.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    BasicActionForm form = createStrictMock(BasicActionForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
View Full Code Here

  @Test
  public void testCancelRegularForm()
  {

    ActionForward actionForward = new ActionForward();

    NavigableFormSubmitBean actionBean = createStrictMock(NavigableFormSubmitBean.class);
    ActionMapping mapping = createStrictMock(ActionMapping.class);
    BasicActionForm form = createStrictMock(BasicActionForm.class);
    HttpServletRequest request = createStrictMock(HttpServletRequest.class);
View Full Code Here

    NavigableController action = new NavigableController();
    BeanNavigationReader navigationReader = new BeanNavigationReader();
    navigationReader.readAnnotations(NavigableReadOnlyBean.class);
    action.setNavigationHolder(navigationReader.getNavigationHolder());

    ActionForward actionForward = new ActionForward();

    NavigableReadOnlyBean actionBean = createMock(NavigableReadOnlyBean.class);
    ActionMapping mapping = createMock(ActionMapping.class);

    actionBean.execute();
View Full Code Here

      break;
    }while(true);
   
    if(!msgs.isEmpty()){
      saveMessages(request, msgs);
      ActionForward upload = makeForward(mapping.findForward("photo_upload"), photo1.getSid());
      upload.setRedirect(false);
      return upload;
    }
    String ext = "aid=" + photo1.getAlbum();
    return makeForward(mapping.findForward("photo_album"), photo1.getSid(), ext);
  }
View Full Code Here

        errMsg = getMessage(request, null, "error.database", e
            .getMessage());
      }
    }

    ActionForward page = null;
    if(errMsg!=null)
      page = makeForward(mapping.findForward(CATALOGS), catalog
        .getSid(), "cat_id=" + catalog.getId() + "#edit");
    else
      page = makeForward(mapping.findForward(CATALOGS), catalog.getSid());
    return msgbox(mapping, form, request, response, errMsg, page.getPath());
  }
View Full Code Here

  protected ActionForward doDelete(ActionMapping mapping, ActionForm form,
      HttpServletRequest request, HttpServletResponse response, String s_cat_id)
      throws Exception
  {
    CatalogForm lform = (CatalogForm)form;
    ActionForward page = makeForward(mapping.findForward(CATALOGS), lform.getSid());
    try{
      int cat_id = Integer.parseInt(s_cat_id);
      //���������Ƿ��б�־Ϊɾ�����ռǻ����Dzݸ�ȣ���������ʾ�û�����ɾ��
      if(CatalogDAO.getDiaryCount(cat_id,true,0)>0){
        String msg = getMessage(request,null,"error.catalog_not_empty");
        return msgbox(mapping,form,request,response,msg,page.getPath());
      }
      CatalogDAO.delete(lform.getSid(), cat_id);
    }catch(Exception e){
      context().log("delete catalog #"+s_cat_id+" failed.", e);
    }
View Full Code Here

    {
      ActionErrors allErrors = new ActionErrors();
      allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.freeForm", "You do not have permission to delete one or more of the records you selected."));
      session.setAttribute("listErrorMessage", allErrors);
    }
    return new ActionForward(request.getParameter("currentPage"), true);
  }
View Full Code Here

    {
      ActionErrors allErrors = new ActionErrors();
      allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.freeForm", "You do not have permission to delete one or more of the records you selected."));
      session.setAttribute("listErrorMessage", allErrors);
    }
    ActionForward forward = new ActionForward(request.getParameter("currentPage"), true);
    return forward;
  }
View Full Code Here

TOP

Related Classes of org.apache.struts.action.ActionForward

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.