// // NOTE: This file was generated from: japidviews/_tags/SampleTag.html // Change to this file will be lost next time the template file is compiled. // @cn.bran.play.NoEnhance public class SampleTag extends cn.bran.japid.template.JapidTemplateBase { public static final String sourceTemplate = "japidviews/_tags/SampleTag.html"; { headers.put("Content-Type", "text/html; charset=utf-8"); } // - add implicit fields with Play final Request request = Request.current(); final Response response = Response.current(); final Session session = Session.current(); final RenderArgs renderArgs = RenderArgs.current(); final Params params = Params.current(); final Validation validation = Validation.current(); final cn.bran.play.FieldErrors errors = new cn.bran.play.FieldErrors(validation); final play.Play _play = new play.Play(); // - end of implicit fields with Play public SampleTag() { super(null); } public SampleTag(StringBuilder out) { super(out); } private String a; public cn.bran.japid.template.RenderResult render(String a) { this.a = a; long t = -1; super.layout(); return new cn.bran.japid.template.RenderResult(this.headers, getOut(), t); } @Override protected void doLayout() { // ------ ; // line 1 p("Hi "); // line 1 p(a); // line 2 p("!\n"); // line 2 } }
// // NOTE: This file was generated from: japidviews/_layouts/SampleLayout.html // Change to this file will be lost next time the template file is compiled. // @cn.bran.play.NoEnhance public abstract class SampleLayout extends cn.bran.japid.template.JapidTemplateBase { public static final String sourceTemplate = "japidviews/_layouts/SampleLayout.html"; { headers.put("Content-Type", "text/html; charset=utf-8"); } // - add implicit fields with Play final Request request = Request.current(); final Response response = Response.current(); final Session session = Session.current(); final RenderArgs renderArgs = RenderArgs.current(); final Params params = Params.current(); final Validation validation = Validation.current(); final cn.bran.play.FieldErrors errors = new cn.bran.play.FieldErrors(validation); final play.Play _play = new play.Play(); // - end of implicit fields with Play public SampleLayout() { super(null); } public SampleLayout(StringBuilder out) { super(out); } @Override public void layout() { p("A sample layout.\n" + "<p>\n"); // line 1 title(); // line 3 p(";\n" + "</p>\n" + "<div>\n"); // line 3 doLayout(); // line 6 p("</div>\n"); // line 6 } protected void title() {}; protected abstract void doLayout(); }