- 浏览: 1863757 次
- 性别:
- 来自: 合肥
文章分类
- 全部博客 (514)
- OPEN (41)
- WARN (33)
- EXPER (16)
- RESOURCE (7)
- TOOL (4)
- DWR (10)
- Struts1.x (10)
- Ibtais (18)
- MyEclipse (30)
- Sql Server (64)
- Tomcat (7)
- APACHE (4)
- JSP (18)
- SERVLET (6)
- ENGLISH (0)
- ECSide (8)
- JasperReports (7)
- JAVA (24)
- JS (42)
- XML (26)
- CVS (8)
- Mind (1)
- JQUERY (2)
- IBATIS (6)
- PROJECT (0)
- STRUTS2 (0)
- PROXOOL (0)
- SPRING (4)
- Hibernate (0)
- SSI (0)
- JBPM (11)
- FLEX (3)
- JSON (2)
- GWT (1)
- jeecms v3 (1)
- Flash (2)
- DATA (1)
- ORACLE (3)
- 查询oracle 中逗号分隔字符串中所有值 (1)
最新评论
-
小小西芹菜:
GoEasy web三步轻松实现web实时推送1. 引入goe ...
服务器推送技术 java -
kg_1997:
这个方法太棒了,可以不用to_date函数,实在是棒!!!
java/oracle日期处理 -
wodesunday:
:idea:
SQL的分段统计查询语句 -
wodesunday:
引用
SQL的分段统计查询语句 -
BlueSkator:
讲的有点浅,没有深入进去
tomcat需要的重新发布和重启服务器的几种情况
一目了然的数据模型
As you have seen, the data-model is basically a tree.正如你所看到的,数据模型基本上是一个树。 This tree can be arbitrarily complicated and deep, for example:这种树可以任意复杂和深刻的,例如:
(root) (根)
| |
+- animals + - 动物
| | | |
| +- mouse | + - 鼠标
| | | | | |
| | +- size = "small" | | + - 大小=“小”
| | | | | |
| | +- price = 50 | | + - 价格= 50
| | | |
| +- elephant | + - 大象
| | | | | |
| | +- size = "large" | | + - 大小=“大”
| | | | | |
| | +- price = 5000 | | + - 价格= 5000
| | | |
| +- python | + - 蟒蛇
| | | |
| +- size = "medium" | + - 尺寸=“中等”
| | | |
| +- price = 4999 | + - 价格= 4999
| |
+- test = "It is a test" + - 测试=“这是一个测试”
| |
+- whatnot + - 诸如此类
| |
+- because = "don't know" + - 因为“不知道”
The variables that act as directories (the root, animals , mouse , elephant , python , whatnot ) are called hashes .充当目录(根, 动物 , 老鼠 , 大象 , 蟒蛇 , 诸如此类 )被称为哈希变量。 Hashes store other variables (the so called哈希存储其他变量(即所谓的 subvariables ) by a lookup name (eg, "animals", "mouse" or "price").查找名称(如“动物”,“鼠标”或“价格”) 的子变量) 。
The variables that store a single value ( size , price , test and because ) are called scalars .存储一个值( 尺寸 , 价格 , 测试和因为 )的变量被称为标量 。
When you want to use a subvariable in a template, you specify its path from the root, and separate the steps with dots.当您要使用的模板中的一个子变量,从根本上指定其路径,并用点分开的步骤。 To access the price of a mouse , you start from the root and go into animals , and then go into mouse then go into price .要访问鼠标的价格,从根开始, 进入动物,然后进入鼠标然后进入价格。 So you write animals.mouse.price .所以,你写animals.mouse.price。 When you put the special ${ ... } codes around an expression like this, you are telling FreeMarker to output the corresponding text at that point.当你把周围表达这样的特殊的$ {...}代码,你告诉FreeMarker的输出在这一点上相应的文本。
There is one more important kind of variable: sequences .还有一个更重要的一种变量: 序列 。 They are similar to hashes, but they don't store names for the variables they contain.它们类似于哈希,但他们不存储它们所包含的变量的名称。 Instead, they store the subvariables sequentially, and you can access them with a numerical index.相反,他们的子变量存储顺序,您可以访问数字索引。 For example, in this data-model, animals and whatnot.fruits are sequences:例如,在这个数据模型, 动物和whatnot.fruits序列:
(root) (根)
| |
+- animals + - 动物
| | | |
| +- (1st) | + - (第1)
| | | | | |
| | +- name = "mouse" | | + - 名称=“鼠标”
| | | | | |
| | +- size = "small" | | + - 大小=“小”
| | | | | |
| | +- price = 50 | | + - 价格= 50
| | | |
| +- (2nd) | + - (第2)
| | | | | |
| | +- name = "elephant" | | + - 名称=“大象”
| | | | | |
| | +- size = "large" | | + - 大小=“大”
| | | | | |
| | +- price = 5000 | | + - 价格= 5000
| | | |
| +- (3rd) | + - (第3)
| | | |
| +- name = "python" | + - 名称=“蟒蛇”
| | | |
| +- size = "medium" | + - 尺寸=“中等”
| | | |
| +- price = 4999 | + - 价格= 4999
| |
+- whatnot + - 诸如此类
| |
+- fruits + - 水果
| |
+- (1st) = "orange" + - (第1)=“橙”
| |
+- (2nd) = "banana" + - (第二)=“香蕉”
To access a subvariable of a sequence you use a numerical index in square brackets.要访问您使用方括号中的数字索引的一个序列的子变量。 Indexes start from 0 (it's a programmer tradition to start with 0), thus the index of the first item is 0, the index of the second item is 1, and so on.索引从0(从0开始,这是一个程序员的传统)开始,因此该指数的第一个项目是0,第二项的索引是1,依此类推。 So to get the name of the first animal you write animals[0].name .所以获得的第一个动物的名称, 你写的动物[0]。名称。 To get the second item in whatnot.fruits (which is the string "banana" ) you write whatnot.fruits[1] .在whatnot.fruits要获得的第二项(这是字符串“香蕉”),你写whatnot.fruits [1] 。
Scalars can be further divided into these categories:标量可进一步分为这些类别:
String: Text, that is, an arbitrary sequence of characters such as ''m'', ''o'', ''u'', ''s'', ''e'' above.字符串:文本,这是一个任意的字符,如序列“米”,“O”,“ü”,“S”,“E”上面。 For example the name -s and size -s are strings above.例如名称 - S和大小 - S是字符串以上。
Number: It's a numerical value, like the price -s above.编号:像s以上的价格 ,这是一个数值。 The string "50" and the number 50 are two totally different things in FreeMarker.字符串“50”和50号是两个完全不同的东西在FreeMarker。 The former is just a sequence of two characters (which happens to be readable as a number for humans), while the latter is a numerical value that you can use, say, in arithmetical calculations.前者仅仅是两个字符的序列(这恰好是一些对人类可读),而后者则是一个数值,您可以使用,例如在算术计算,。
Date/time: A date or time.日期/时间:日期或时间。 Like the date an animal were captured, or the time the shop opens.日期一样的动物被抓获,或打开店铺的时间。
Boolean: A true/false (yes/no, on/off, etc.) thing.布尔:一个真/假(是/否,开/关,等)的事情。 Like animals could have a protected subvariable, which store if the animal is protected or not.喜欢的动物可能有一个受保护的子变量,它存储如果动物是保护或不保护。
Summary:摘要:
The data-model can be visualized as a tree.数据模型可以可视化树。
Scalars store a single value.标量存储一个值。 The value can be a string or a number or a date/time or a boolean.该值可以是一个字符串或一个数字或日期/时间或布尔。
Hashes are containers that store other variables and associate them with a unique lookup name.哈希存储其他变量和一个独特的查找名称相关联的容器。
Sequences are containers that store other variables in an ordered sequence.序列是一个有序的序列,存储在其他变量的容器。 The stored variables can be retrieved via their numerical index, starting from 0.检索存储的变量可以通过其数字索引,从0开始。
As you have seen, the data-model is basically a tree.正如你所看到的,数据模型基本上是一个树。 This tree can be arbitrarily complicated and deep, for example:这种树可以任意复杂和深刻的,例如:
(root) (根)
| |
+- animals + - 动物
| | | |
| +- mouse | + - 鼠标
| | | | | |
| | +- size = "small" | | + - 大小=“小”
| | | | | |
| | +- price = 50 | | + - 价格= 50
| | | |
| +- elephant | + - 大象
| | | | | |
| | +- size = "large" | | + - 大小=“大”
| | | | | |
| | +- price = 5000 | | + - 价格= 5000
| | | |
| +- python | + - 蟒蛇
| | | |
| +- size = "medium" | + - 尺寸=“中等”
| | | |
| +- price = 4999 | + - 价格= 4999
| |
+- test = "It is a test" + - 测试=“这是一个测试”
| |
+- whatnot + - 诸如此类
| |
+- because = "don't know" + - 因为“不知道”
The variables that act as directories (the root, animals , mouse , elephant , python , whatnot ) are called hashes .充当目录(根, 动物 , 老鼠 , 大象 , 蟒蛇 , 诸如此类 )被称为哈希变量。 Hashes store other variables (the so called哈希存储其他变量(即所谓的 subvariables ) by a lookup name (eg, "animals", "mouse" or "price").查找名称(如“动物”,“鼠标”或“价格”) 的子变量) 。
The variables that store a single value ( size , price , test and because ) are called scalars .存储一个值( 尺寸 , 价格 , 测试和因为 )的变量被称为标量 。
When you want to use a subvariable in a template, you specify its path from the root, and separate the steps with dots.当您要使用的模板中的一个子变量,从根本上指定其路径,并用点分开的步骤。 To access the price of a mouse , you start from the root and go into animals , and then go into mouse then go into price .要访问鼠标的价格,从根开始, 进入动物,然后进入鼠标然后进入价格。 So you write animals.mouse.price .所以,你写animals.mouse.price。 When you put the special ${ ... } codes around an expression like this, you are telling FreeMarker to output the corresponding text at that point.当你把周围表达这样的特殊的$ {...}代码,你告诉FreeMarker的输出在这一点上相应的文本。
There is one more important kind of variable: sequences .还有一个更重要的一种变量: 序列 。 They are similar to hashes, but they don't store names for the variables they contain.它们类似于哈希,但他们不存储它们所包含的变量的名称。 Instead, they store the subvariables sequentially, and you can access them with a numerical index.相反,他们的子变量存储顺序,您可以访问数字索引。 For example, in this data-model, animals and whatnot.fruits are sequences:例如,在这个数据模型, 动物和whatnot.fruits序列:
(root) (根)
| |
+- animals + - 动物
| | | |
| +- (1st) | + - (第1)
| | | | | |
| | +- name = "mouse" | | + - 名称=“鼠标”
| | | | | |
| | +- size = "small" | | + - 大小=“小”
| | | | | |
| | +- price = 50 | | + - 价格= 50
| | | |
| +- (2nd) | + - (第2)
| | | | | |
| | +- name = "elephant" | | + - 名称=“大象”
| | | | | |
| | +- size = "large" | | + - 大小=“大”
| | | | | |
| | +- price = 5000 | | + - 价格= 5000
| | | |
| +- (3rd) | + - (第3)
| | | |
| +- name = "python" | + - 名称=“蟒蛇”
| | | |
| +- size = "medium" | + - 尺寸=“中等”
| | | |
| +- price = 4999 | + - 价格= 4999
| |
+- whatnot + - 诸如此类
| |
+- fruits + - 水果
| |
+- (1st) = "orange" + - (第1)=“橙”
| |
+- (2nd) = "banana" + - (第二)=“香蕉”
To access a subvariable of a sequence you use a numerical index in square brackets.要访问您使用方括号中的数字索引的一个序列的子变量。 Indexes start from 0 (it's a programmer tradition to start with 0), thus the index of the first item is 0, the index of the second item is 1, and so on.索引从0(从0开始,这是一个程序员的传统)开始,因此该指数的第一个项目是0,第二项的索引是1,依此类推。 So to get the name of the first animal you write animals[0].name .所以获得的第一个动物的名称, 你写的动物[0]。名称。 To get the second item in whatnot.fruits (which is the string "banana" ) you write whatnot.fruits[1] .在whatnot.fruits要获得的第二项(这是字符串“香蕉”),你写whatnot.fruits [1] 。
Scalars can be further divided into these categories:标量可进一步分为这些类别:
String: Text, that is, an arbitrary sequence of characters such as ''m'', ''o'', ''u'', ''s'', ''e'' above.字符串:文本,这是一个任意的字符,如序列“米”,“O”,“ü”,“S”,“E”上面。 For example the name -s and size -s are strings above.例如名称 - S和大小 - S是字符串以上。
Number: It's a numerical value, like the price -s above.编号:像s以上的价格 ,这是一个数值。 The string "50" and the number 50 are two totally different things in FreeMarker.字符串“50”和50号是两个完全不同的东西在FreeMarker。 The former is just a sequence of two characters (which happens to be readable as a number for humans), while the latter is a numerical value that you can use, say, in arithmetical calculations.前者仅仅是两个字符的序列(这恰好是一些对人类可读),而后者则是一个数值,您可以使用,例如在算术计算,。
Date/time: A date or time.日期/时间:日期或时间。 Like the date an animal were captured, or the time the shop opens.日期一样的动物被抓获,或打开店铺的时间。
Boolean: A true/false (yes/no, on/off, etc.) thing.布尔:一个真/假(是/否,开/关,等)的事情。 Like animals could have a protected subvariable, which store if the animal is protected or not.喜欢的动物可能有一个受保护的子变量,它存储如果动物是保护或不保护。
Summary:摘要:
The data-model can be visualized as a tree.数据模型可以可视化树。
Scalars store a single value.标量存储一个值。 The value can be a string or a number or a date/time or a boolean.该值可以是一个字符串或一个数字或日期/时间或布尔。
Hashes are containers that store other variables and associate them with a unique lookup name.哈希存储其他变量和一个独特的查找名称相关联的容器。
Sequences are containers that store other variables in an ordered sequence.序列是一个有序的序列,存储在其他变量的容器。 The stored variables can be retrieved via their numerical index, starting from 0.检索存储的变量可以通过其数字索引,从0开始。
发表评论
-
Apache FileUpload组件
2013-11-22 15:05 5410Apache FileUpload组件 在最初的 htt ... -
各种数据库对应的jar包、驱动类名和URL格式
2012-11-20 16:38 1468各种数据库对应的jar包、驱动类名和URL格式 2011 ... -
Java Web Start
2011-09-14 10:45 1323一.首先了解一下什么是java web start 1JNL ... -
The template at a glance一目了然的模板
2011-08-05 09:06 1469The template at a glance一目了然的模板 ... -
jeecms v3
2011-07-04 15:28 1536好久没有逛jeecms的官方论坛了,今天去看了下,jeecms ... -
gwt整合ibatis
2011-07-02 09:42 2044最近整合gwt整合ibatis,常见错误 控制台报错: 一.N ... -
GWT RPC原理浅析(二)
2011-06-17 16:14 2830前一篇介绍了RPC大体的流程,核心方法是RemoteServi ... -
GWT RPC原理浅析
2011-06-17 15:26 5285GWT中前后台交互有多种方式,包括JSON,XML,RPC 其 ... -
五种开源协议
2011-04-25 14:54 1078五种开源协议(BSD,Apache,G ... -
JAVA代码调用客户端摄像头 初步探讨
2011-02-21 16:51 6716首先到sun下载最新的jmf,然后安装。 然后,说一下 ... -
tomcat部署jbpm项目 loader constraint violation
2011-02-11 14:22 1767当tomcat部署jbpm项目 时,启动项目控制台出错 ja ... -
E3.Tree参考手册
2010-12-10 09:52 3540E3.Tree参考手册 (v1.0) 目录 简介 2 系统 ... -
e3.tree 1.5 发布,很好,很强大,有截图[转]
2010-12-07 14:14 1111E3.Tree是E3平台下一个用于构造树型UI(menu,tr ... -
在Action中获取ServletContext实例
2010-11-25 13:43 37341:在Action中获取servletContext的时候可以 ... -
Bean named 'sqlMapClient' must be of type [org.springframework.orm.ibatis.SqlMap
2010-11-22 09:57 4876在整合spring2.5和ibatis2,出现了ibatis的 ... -
spring,ibatis的笔记
2010-11-22 08:51 1007在上文中,我们把iface ... -
spring,ibatis的笔记
2010-11-22 08:51 943在上文中,我们把iface ... -
后台错误处理
2010-11-17 15:10 1290后台处理 if (!isTokenValid(request) ... -
struts1 和Spring整合jar包
2010-11-17 11:33 4984struts1 和Spring整合 struts1 和Spri ... -
spring 与struts的集成
2010-11-17 08:37 1254Struts与Spring的集成主要有两种方式,即Delega ...
相关推荐
Freemarker页面语法 A 概念 最常用的 3 个概念 sequence 序列,对应java 里的list 、数组等非键值对的集合 hash 键值对的集合 namespace 对一个ftl 文件的引用, 利用这个名字可以访问到该ftl 文件的资源 ...
赠送jar包:freemarker-2.3.31.jar; 赠送原API文档:freemarker-2.3.31-javadoc.jar; 赠送源代码:freemarker-2.3.31-sources.jar; 赠送Maven依赖信息文件:freemarker-2.3.31.pom; 包含翻译后的API文档:...
赠送jar包:freemarker-2.3.30.jar; 赠送原API文档:freemarker-2.3.30-javadoc.jar; 赠送源代码:freemarker-2.3.30-sources.jar; 赠送Maven依赖信息文件:freemarker-2.3.30.pom; 包含翻译后的API文档:...
安装freemarker插件(freemarker的eclipse插件) a) 首先下载 freemarker-ide-0.9.14.zip(在这里不用下载了,附件中已经有了) b) 解压后:把hudson.freemarker_ide_0.9.14这个文件放到:eclipse\plugins下面 c) 发现...
一篇freemarker很不错的文章 reeMarker的模板文件并不比HTML页面复杂多少,FreeMarker模板文件主要由如下4个部分组成: 1,文本:直接输出的部分 2,注释:格式部分,不会输出 3,插值:即${...}或#{...}格式的部分,将使用...
什么是FreeMarker? ................................................................................................. 7 我们应该阅读什么内容? .............................................................
3. freemarker(FreemarkerUtils) 对于没有使用宏、函数等word、excel,需要按模板动态生成word、excel、html,只需要一个freemarker,先将word、excel、html等另存为**xml**,即可使用模板动态生成文件,目前xlsx是...
大致的思路是先用office2003或者2007编辑好word的样式,然后另存为xml,将xml翻译为FreeMarker模板,最后用java来解析FreeMarker模板并输出‘.doc’ word文档。经测试这样方式生成的word文档完全符合office标准,...
赠送jar包:freemarker-2.3.30.jar; 赠送原API文档:freemarker-2.3.30-javadoc.jar; 赠送源代码:freemarker-2.3.30-sources.jar; 赠送Maven依赖信息文件:freemarker-2.3.30.pom; 包含翻译后的API文档:...
FreeMarker
基于Java语言来导出Word文档的方式也有很多种,如Jacob,Apache POI,Freemarker,PageOffice,java2word 等等。。。。 在这里将通过Freemarker这个模板引擎来实现导出 Word,项目不限于Swing,SSH,SSM,Spring ...
freemarker格式化的eclipse插件。用于freemarker的格式化。
freemarker替换变量实例
在开发web项目的时候使用到的页面展现技术,它并...总体,该文档能够提供所有常用的freemarker操作,示例和简略的讲解可以让人一下子就能上手,效率极高。 适合做快速查阅册子,同时也非常适合初学者和骨灰开发者使用。
赠送jar包:freemarker-2.3.23.jar; 赠送原API文档:freemarker-2.3.23-javadoc.jar; 赠送源代码:freemarker-2.3.23-sources.jar; 赠送Maven依赖信息文件:freemarker-2.3.23.pom; 包含翻译后的API文档:...
FreeMarker中文文档.pdf FreeMarker入门必修
2.将xml中需要动态修改内容的地方,换成freemarker的标识符 添加图片 如果你需要在word中添加图片,那你就在第一步制作模板时,加入一张图片占位,然后打开xml文档,可 以看到如下的一片base64编码后的代码: ...
FreeMarker在Eclipse安装 1.将插件hudson.freemarker_ide_0.9.14文件夹放到eclipse下的plugins文件夹下 按理,这样的话,重启eclipse就应该解决了 但是不成 因为hudson.freemarker_ide_0.9.14文 件夹下的...