.dp-highlighter { background-color:transparent; font-family:"Consolas","Courier New",Courier,mono; font-size:12px; margin-left:9px; overflow:auto; padding:1px; width:97%; } .dp-highlighter ol { background-color:#FFFFFF; border:1px solid #D1D7DC; color:#2B91AF; list-s ...
网上已经有用dreamweaver 8打开gsp文件 。那么这里我就介绍下用dreamweaver CS3打开gsp文件 基本原理还是一样的,只是修改的文件的位置不同: 1 打开dw CS3安装时的目录   \Documents and Settings\username\Application Data\Adobe\Dreamweaver 8\Configuration, 在其中的extenstion.txt文件中的第一行,有很多文件后缀的,加入gsp 在最后一行,加入 gsp:grails文件。   这样以后dw8里,打开的设置里,可以选出 ...
经过我们大家的努力Grails中文文档终于面试了 下载抵制 beta版的url: http://www.chinagroovy.org/grails-doc/index.html ,beta 版下载: http://wiki.redsaga.com/confluence/download/attachments/2458/grails-doc-1.0-beta1.tar.gz
正則表達式就像一把瑞士軍刀。 "potatoe" ==~ /potatoe/  假如你在groovyConsole運行它,將返回true.這裡有兩件需要注意的事情: 1.==~操作符。它類似于==操作符,但是用於匹配模式而不是計算相等性。 2.正則表達式包含在 '/'中.它會告訴Groovy這是個正則表達式而不是String. "potatoe" ==~ /potatoe?/ "potato" ==~ /potatoe?/  這裡?表達的意思是'e'是可選的。 "motato&qu ...
(-)变量 你可以给变量赋值. 像下面: x = 1 println x x = new java.util.Date() println x x = -3.1499392 println x x = false println x x = "Hi" println x  (二)Lists and Maps Groovy已经内置支持两种重要的数据类型, lists 和maps((Lists就像java中的数组一样来操作))Lists用来存储有序集合数据,例如: myList = [1776, -1, 33, 99, 0, 92873 ...
关于Grails乱码的问题 个人测试了以后 还是属于编辑器的问题 对于IDEA来说安装后,默认的使用系统编码(GB2312),我们最好是设置成UTF-8 其实挺简单的 按照下面图中的步骤,就可以在IDEA中解决Grails乱码的问题     选择Settings-->General修改下图的编码设置就OK了!         对于其他网站说的修改文件,在这里就没有必要了,不需要修改任何文件 如果你把grails.views.gsp.encoding="UTF-8&qu ...
h4. Returning the Modelh4. 返回模型(Model)A model is essentially a map that the view uses when rendering. The keys within that map translate to variable names accessible by the view. There are a couple of ways to return a model, the first way is to explicitly return a map instance:模型(Model)本质上是个map类型,当视 ...
h4. Available Scopesh4.可用范围(Scopes)Scopes are essentially hash like objects that allow you to store variables. The following scopes are available to controllers:范围(Scopes)本质上就像hash对象,允许你存储变量。下列为controllers(控制器)可用范围(Scopes):* [servletContext|controllers] - Also known as application scope, this scope ...
h4. Creating a controllerh4. 创建控制器(Controllers)Controllers can be created with the [create-controller|commandLine] target. For example try running the following command from the root of a Grails project:控制器(Controllers)可以使用[create-controller|commandLine]目标来创建.作为示例可以在Grails根目录下尝试运行下列命令。{code:java}gra ...
A controller handles requests and creates or prepares the response and is request-scoped.  In other words a new instance is created for each [request|controllers]. A controller can generate the response or delegate to a view. To create a controller simply create a class whose name ends with @Co ...