Package com.google.sitebricks

Examples of com.google.sitebricks.StringBuilderRespond.redirect()


    Respond respond = new StringBuilderRespond(instance);
    respond.setErrors(errors);
    if (null != redirect) {

      if (redirect instanceof String)
        respond.redirect((String) redirect);
      else if (redirect instanceof Class) {
        PageBook.Page targetPage = book.forClass((Class<?>) redirect);

        // should never be null coz it is validated on compile.
        respond.redirect(contextualize(request, targetPage.getUri()));
View Full Code Here


        respond.redirect((String) redirect);
      else if (redirect instanceof Class) {
        PageBook.Page targetPage = book.forClass((Class<?>) redirect);

        // should never be null coz it is validated on compile.
        respond.redirect(contextualize(request, targetPage.getUri()));
      } else if (redirect instanceof Reply<?>) {
        // To allow non-headless pages to use Reply<?> for more advanced HTTP responses
        return redirect;
      } else {
        // Handle page-chaining driven redirection.
View Full Code Here

        // should never be null coz it will be validated at compile time.
        flashCacheProvider.get().put(targetPage.getUri(), targetPage);

        // Send to the canonical address of the page. This is also
        // verified at compile, not be a variablized matcher.
        respond.redirect(contextualize(request, targetPage.getUri()));
      }
    } else {
      page.widget().render(instance, respond);
    }
   
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.