Examples of ForwardView


Examples of net.sourceforge.pebble.web.view.ForwardView

    if (blogEntry == null) {
      return new NotFoundView();
    }

    if (submit.equals("Edit")) {
      return new ForwardView("/editBlogEntry.secureaction?entry=" + id);
    } else if (submit.equals("Publish") || submit.equals("Unpublish")) {
      getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
      return new PublishBlogEntryView();
    } else if (submit.equals("Clone")) {
      return new ForwardView("/addBlogEntry.secureaction?entryToClone=" + blogEntry.getId());
    } else if (confirm != null && confirm.equals("true")) {
      if (submit.equalsIgnoreCase("Remove")) {
        try {
          service.removeBlogEntry(blogEntry);
          blog.info("Blog entry \"" + StringUtils.transformHTML(blogEntry.getTitle()) + "\" removed.");
        } catch (BlogServiceException be) {
          throw new ServletException(be);
        }

        return new ForwardView("/viewHomePage.action");
      }
    }

    return new RedirectView(blogEntry.getLocalPermalink());
  }
View Full Code Here

Examples of net.sourceforge.pebble.web.view.ForwardView

      addTerms(query, "tag", s);
    }

    try {
      String encodedQuery = URLEncoder.encode(query.toString(), blog.getCharacterEncoding());
      return new ForwardView("/search.action?query=" + encodedQuery);
    } catch (UnsupportedEncodingException uee) {
      throw new ServletException(uee);
    }
  }
View Full Code Here

Examples of net.sourceforge.pebble.web.view.ForwardView

    if (staticPage == null) {
      return new NotFoundView();
    }

    if (submit.equals("Edit")) {
      return new ForwardView("/editStaticPage.secureaction?page=" + id);
    } else if (submit.equalsIgnoreCase("Remove") && confirm != null && confirm.equals("true")) {
      try {
        if (service.lock(staticPage)) {
          service.removeStaticPage(staticPage);
          blog.info("Static page \"" + staticPage.getTitle() + "\" removed.");
View Full Code Here

Examples of net.sourceforge.pebble.web.view.ForwardView

          }
        }
      }
    }

    return new ForwardView("/viewCategories.secureaction");
  }
View Full Code Here

Examples of org.nutz.mvc.view.ForwardView

        throw Lang.wrapThrow(e);
      }
    }
   
    if ("ftl".equals(type))
      return new ForwardView(value) {
      protected String getExt() {
        return "ftl";
      }
    };
   
    if ("hibernateJson".equals(type)) {
      if (value == null)
        return new HibernateJsonView(JsonFormat.nice());
      return new HibernateJsonView(Json.fromJson(JsonFormat.class, value));
    }
   
    if (type.startsWith("->") && type.length() > 2) {
      final String myType = type.substring(1);
      return new ForwardView(value) {
        protected String getExt() {
          return myType;
        }
      };
    }
View Full Code Here

Examples of org.nutz.mvc.view.ForwardView

      return HTTP_404;
    }
    if (metaStr.startsWith("url:")) {
      return new ServerRedirectView(Files.read(f));
    } else if (metaStr.startsWith("txt:")) {
      return new ForwardView("/txt.html");
    } else {
      return new ForwardView("/down.html");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.