Package net.sourceforge.stripes.action

Examples of net.sourceforge.stripes.action.Resolution


 
  public Resolution save() {
    Log.out.debug("Begin EditInvoice.save()");
    Invoice oInv = saveInvoice();
    Dms oDms;
    Resolution oRes = new RedirectResolution(ListNewInvoices.class);
    try {
      connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
      oDms = getSession().getDms();
      SortableList<Document> oNext = oDms.query("(Invoice$is_processed='0') & (Invoice$recipient_taxpayer='"+getRecipientTaxPayer()+"')");
      if (!oNext.isEmpty()) {
View Full Code Here


      setApproved(true);
      setProcessed(true);
      setMistakes(false);
      saveInvoice();
      Dms oDms;
      Resolution oRes = new RedirectResolution(ListPendingInvoices.class);
      try {
        connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
        oDms = getSession().getDms();
        SortableList<Document> oNext = oDms.query("(Invoice$is_processed='1') & (Invoice$is_approved='0') & (Invoice$recipient_taxpayer='"+getRecipientTaxPayer()+"')");
        if (!oNext.isEmpty()) {
View Full Code Here

      setApproved(false);
      setProcessed(false);
      setMistakes(true);
      Invoice oInv = saveInvoice();
      Dms oDms;
      Resolution oRes = new RedirectResolution(ListPendingInvoices.class);
      try {
        connect();
        oDms = getSession().getDms();
        Log.out.debug("Dms.query((Invoice$is_processed='1') & (Invoice$is_approved='0') & (Invoice$recipient_taxpayer='"+getRecipientTaxPayer()+"'))");
        SortableList<Document> oNext = oDms.query("(Invoice$is_processed='1') & (Invoice$is_approved='0') & (Invoice$recipient_taxpayer='"+getRecipientTaxPayer()+"')");
View Full Code Here

    else
      return isAjaxBean(oCls.getSuperclass());
  }

  private Resolution resolve(Class oCls, String sErrCode, String sLastURL) {
    Resolution oRes;
    if (isAjaxBean(oCls)) {
      oRes = new RedirectResolution("/ajaxerror.jsp?e="+sErrCode);     
    } else {
      oRes = new RedirectResolution("/enter.jsp?e="+sErrCode);
      if (sLastURL!=null)
View Full Code Here

    }
    return oRes;
  }

  public Resolution intercept(ExecutionContext execContext) throws Exception {
    Resolution oRes = execContext.proceed();
    BaseActionBean oBab = (BaseActionBean) execContext.getActionBean();
    Class<? extends ActionBean> oCls = oBab.getClass();
    if (ALLOW.contains(oCls)) {
      return oRes;
    } else {
View Full Code Here

    }
  }

  public Resolution save() {
    Log.out.debug("Begin ActivateTaxPayer.save()");
    Resolution oRes;
    try {
      connect();
      TaxPayer oTxpr = new TaxPayer(getSession().getDms(), getTaxPayer().getId());
      String sFormerTemporaryName = oTxpr.getBusinessName();
      bindObject(getTaxPayer(), oTxpr);
View Full Code Here

            if (proxy != null) {
                proxy.handle(actual, request, response);
            }
            else if (throwable instanceof FileUploadLimitExceededException) {
                Resolution resolution = handle((FileUploadLimitExceededException) throwable,
                        request, response);
                if (resolution != null)
                    resolution.execute(request, response);
            }
            else if (throwable instanceof SourcePageNotFoundException) {
                Resolution resolution = handle((SourcePageNotFoundException) throwable, request,
                        response);
                if (resolution != null)
                    resolution.execute(request, response);
            }
            else {
                // If there's no sensible proxy, rethrow the original throwable,
                // NOT the unwrapped one since they may add extra information
                log.warn(throwable, "Unhandled exception caught by the Stripes default exception handler.");
View Full Code Here

    public Resolution view() {
        final InputStream stream = getContext().getRequest().getSession()
                                  .getServletContext().getResourceAsStream(this.resource);
        final BufferedReader reader = new BufferedReader( new InputStreamReader(stream) );

        return new Resolution() {
            public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
                PrintWriter writer = response.getWriter();
                writer.write("<html><head><title>");
                writer.write(resource);
                writer.write("</title></head><body><pre>");
View Full Code Here

     * @param context the current execution context
     * @return the Resolution produced by calling context.proceed()
     * @throws Exception if the Spring binding process produced unrecoverable errors
     */
    public Resolution intercept(ExecutionContext context) throws Exception {
        Resolution resolution = context.proceed();
        log.debug("Running Spring dependency injection for instance of ",
                  context.getActionBean().getClass().getSimpleName());
        SpringHelper.injectBeans(context.getActionBean(), context.getActionBeanContext());
        return resolution;
    }
View Full Code Here

        boolean doValidate = annotation == null || !annotation.ignoreBindingErrors();

        // If we have errors, add the action path to them
        fillInValidationErrors(ctx);

        Resolution resolution = null;
        if (doValidate) {
            ActionBean bean = ctx.getActionBean();
            ActionBeanContext context = ctx.getActionBeanContext();
            ValidationErrors errors = context.getValidationErrors();
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.action.Resolution

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.