Package net.sourceforge.pebble.web.view

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


      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

    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

          }
        }
      }
    }

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

TOP

Related Classes of net.sourceforge.pebble.web.view.ForwardView

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.