📄 macros.vm
字号:
<html><body><h1>Test of Velocity macros</h1><h2>\#action/\#execute</h2>#action ("Test" $test)#execute($test)$test.name<br><h2>\#bean</h2>#bean ("webwork.util.Counter" $counter)$counter.current<br><h2>\#url</h2>#url ($link)$link.setPage("foo.action")<br>$link.setPage("/foo.action").addParameter("bar","1")<br>$link.setPage("http://mydomain.com/foo.action").addParameter("bar","1").addParameter("xyzzy","2")<br>$link.addParameter("bar","1").addParameter("xyzzy","2")<br><h2>\#includeservlet/\#url</h2>#includeservlet (${link.setPage("test.vm").addParameter("foo","bar")})#includeservlet ("test.vm?foo=bar")</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -