Package org.nutz.mvc.view

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


      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

Related Classes of org.nutz.mvc.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.