Examples of pushLocalContext()


Examples of org.commontemplate.core.Context.pushLocalContext()

  protected void serialize(Serializable obj, HttpServletResponse response, String page)
      throws IOException {
    Template template = engine.getTemplate(page);
    Context context = engine.createContext(response.getWriter());
    try {
      context.pushLocalContext(new ModelMap(obj));
      context.setLocale(getLocale());
      template.render(context);
    } finally {
      context.clear();
    }
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.