1.页面布局

• Screen,代表页面的主体。
• Layout,代表页面的布局。
• Control,代表嵌在screen和layout中的页面片段。
用asp.net的概念套用
Layout->Master母版页
Control->用户控件
Screen->内容页面
好比Layout就是一个模板准备了一个占位页面,screen往里面填充即可
2.screen示例
hello.vm
$page.setTitle("Welcome to Petstore!")
$hello
Hello.java(非必须)
public class Hello {
private final static Logger log = LoggerFactory.getLogger(Hello.class);
public void execute(Context context) {
context.put("hello","hello,Webx");
}
}
3.参数注入

网友评论