Пример #1
0
 /**
  * render with the specified template.
  *
  * @param templateName The template must be rooted in the {templateRoot/}/japidviews tree. The
  *     template name starts with or without "japidviews". The naming pattern is the same as in
  *     ClassLoader.getResource().
  * @param args
  * @return the result string
  */
 public static String renderWith(String templateName, Object... args) {
   return JapidPlainController.renderJapidWith(templateName, args);
 }
Пример #2
0
 public static String renderWith(
     Class<? extends JapidTemplateBaseWithoutPlay> cla, Object... args) {
   return JapidPlainController.renderWith(cla, args);
 }
Пример #3
0
 /**
  * a facet method to wrap implicit template binding. The default template is named as the class
  * and method that immediately invoke this method. e.g. for an invocation scenario like this
  *
  * <pre>
  * package pack;
  *
  * public class Foo {
  * 	public String bar() {
  * 		return JapidRender.render(p);
  * 	}
  * }
  * </pre>
  *
  * The template to use is "{templateRoot}/japidviews/pack/Foo/bar.html".
  *
  * @param p
  * @return
  */
 public static String render(Object... args) {
   String templateName = findTemplate();
   return JapidPlainController.renderJapidWith(templateName, args);
 }