本文整理汇总了Java中com.fizzed.rocker.RenderingException类的典型用法代码示例。如果您正苦于以下问题:Java RenderingException类的具体用法?Java RenderingException怎么用?Java RenderingException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RenderingException类属于com.fizzed.rocker包,在下文中一共展示了RenderingException类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: __doRender
import com.fizzed.rocker.RenderingException; //导入依赖的package包/类
@Override
protected void __doRender() throws IOException, RenderingException {
// PlainText @ [1:41]
__internal.aboutToExecutePosInTemplate(1, 41);
__internal.writeValue(PLAIN_TEXT_0_0);
// ValueExpression @ [5:16]
__internal.aboutToExecutePosInTemplate(5, 16);
__internal.renderValue(title, false);
// PlainText @ [5:22]
__internal.aboutToExecutePosInTemplate(5, 22);
__internal.writeValue(PLAIN_TEXT_1_0);
// ValueExpression @ [8:5]
__internal.aboutToExecutePosInTemplate(8, 5);
__internal.renderValue(content, false);
// PlainText @ [8:13]
__internal.aboutToExecutePosInTemplate(8, 13);
__internal.writeValue(PLAIN_TEXT_2_0);
}
示例2: __doRender
import com.fizzed.rocker.RenderingException; //导入依赖的package包/类
@Override
protected void __doRender() throws IOException, RenderingException {
// ValueClosureBegin @ [3:1]
__internal.aboutToExecutePosInTemplate(3, 1);
__internal.renderValue(views.main.template("Home").__body(() -> {
// PlainText @ [3:34]
__internal.aboutToExecutePosInTemplate(3, 34);
__internal.writeValue(PLAIN_TEXT_0_0);
// ValueExpression @ [4:15]
__internal.aboutToExecutePosInTemplate(4, 15);
__internal.renderValue(message, false);
// PlainText @ [4:23]
__internal.aboutToExecutePosInTemplate(4, 23);
__internal.writeValue(PLAIN_TEXT_1_0);
// ValueExpression @ [4:27]
__internal.aboutToExecutePosInTemplate(4, 27);
__internal.renderValue(locals.get("username"), false);
// PlainText @ [4:50]
__internal.aboutToExecutePosInTemplate(4, 50);
__internal.writeValue(PLAIN_TEXT_2_0);
// ValueClosureEnd @ [3:1]
__internal.aboutToExecutePosInTemplate(3, 1);
}), false); // value closure end @ [3:1]
}
示例3: renderRequestTemplate
import com.fizzed.rocker.RenderingException; //导入依赖的package包/类
@Test
public void renderRequestTemplate() throws Exception {
Map<String, Object> locals = ImmutableMap.of("foo", "bar");
new MockUnit(RockerModel.class, Renderer.Context.class)
.expect(model(RockerModel.class))
.expect(send)
.expect(unit -> {
Context context = unit.get(Renderer.Context.class);
expect(context.locals()).andReturn(locals);
})
.run(unit -> {
new RockerRenderer("", ".rocker.html")
.render(unit.get(RockerModel.class), unit.get(Renderer.Context.class));
}, unit -> {
RequestRockerTemplate template = new RequestRockerTemplate(unit.get(RockerModel.class)) {
@Override
protected void __doRender() throws IOException, RenderingException {
}
};
unit.captured(RockerTemplateCustomizer.class).iterator().next().customize(template);
assertEquals(locals, template.locals);
});
}
示例4: template
import com.fizzed.rocker.RenderingException; //导入依赖的package包/类
private RequestRockerTemplate template(final RockerModel model) {
return new RequestRockerTemplate(model) {
@Override
protected void __doRender() throws IOException, RenderingException {
}
};
}
示例5: buildTemplate
import com.fizzed.rocker.RenderingException; //导入依赖的package包/类
@Override
protected DefaultRockerTemplate buildTemplate() throws RenderingException {
// optimized for performance (via rocker.optimize flag; no auto reloading)
return new Template(this);
}