领先的 与 技术推广者
目 录
1.本文目地和使用对象......................................................................................................................................3
2.什么是 Velocity?..............................................................................................................................................3
3.Velocity 能为你做什么?..................................................................................................................................3
1.一个 Mud Store Example........................................................................................................................3
4.Velocity Template Language (VTL): 介绍......................................................................................................4
5.输出第一个 VTL 页面!...................................................................................................................................5
6.Comments(注释)..............................................................................................................................................5
7.References(引用).............................................................................................................................................5
1.Variables(变量)........................................................................................................................................6
2.Properties(属性).......................................................................................................................................6
3.Methods(命令)....................................................................................................................................6
4.属性引用中的属性查找规则.................................................................................................................7
8.Formal Reference Notation(正规引用格式注意事项)...................................................................................7
9.Quiet Reference Notation(静态引用输出).....................................................................................................7
10.Getting literal( 语义问题).............................................................................................................................8
1.Currency(货币标志)................................................................................................................................8
2.Escaping Valid VTL References(封装有效的引用)...............................................................................8
11.Case Substitution(可选的格式).....................................................................................................................9
12.Directives(指令符号)..................................................................................................................................10
1.#set 指令................................................................................................................................................10
2.Literals (语义解析)................................................................................................................................12
3.Conditionals(条件判断)........................................................................................................................13
4.Loops(循环)...........................................................................................................................................15
3.Include(引入).........................................................................................................................................16
6.Parse(解析模板)....................................................................................................................................16
7.Stop........................................................................................................................................................16
8.Velocimacros(宏调用)...........................................................................................................................17
13.注掉 VTL Directives...................................................................................................................................19
14.VTL: 一般使用的格式................................................................................................................................20
15.Other Features and Miscellany(其它特性和细节).....................................................................................21
1.数学计算................................................................................................................................................21
2.Range Operator......................................................................................................................................21
3.Advanced Issues: Escaping and !..........................................................................................................23
4.Velocimacro Miscellany(关于宏的一些问题).....................................................................................23
5.String Concatenation(连结字符串).......................................................................................................25
16.Feedback......................................................................................................................................................25
,,,