在使用webx做mvc时,页面是如何被该框架解析的呢?
1 用户输入http://localhost:8081/index.htm
2 分析url取得target /index.htm
3 然后根据target查找screen模板 /screen/index.vm
4 根据target查找screen模块的类:
xxx.module.screen.index 如果找不到该类
xxx.module.screen.default 如果找到该类
5 执行screen类,并渲染screen模板
6 根据target查找layout模板
/layout/index.vm 找不到
/layout/default.vm 找到
7 渲染layout模板
8 渲染layout模板中引用的一个control
有一个webx的web应用:
mvn archetype:generate -DgroupId=org.dueam -DartifactId=sample -Dversion=1.0-SNAPSHOT -Dpackage=org.dueam.sample -DarchetypeVersion=1.0-SNAPSHOT -DarchetypeArtifactId=archetype-webx-quickstart -DarchetypeGroupId=com.alibaba.citrus.tool -DarchetypeCatalog=http://mvnrepo.taobao.ali.com/mvn/repository/ -DarchetypeRepository=http://mvnrepo.taobao.ali.com/mvn/repository/ -DinteractiveMode=false