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类型,当视 ...
- 00:02
- 浏览 (287)
- 评论 (0)
- 分类: Groovy on Grails
- 发布在 Groovy on Grails 圈子
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 ...
- 23:39
- 浏览 (275)
- 评论 (0)
- 分类: Groovy on Grails
- 发布在 Groovy on Grails 圈子
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 ...
- 23:16
- 浏览 (226)
- 评论 (0)
- 分类: Groovy on Grails
- 发布在 Groovy on Grails 圈子
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 ...
- 22:52
- 浏览 (215)
- 评论 (0)
- 分类: Groovy on Grails
- 发布在 Groovy on Grails 圈子
翻译自《Groovy in action》,如有不准确之处,希望指教! closures(闭包)很重要,非常的重要!!!可以被认为是Groovy中一个非常有用的特性。同时,在你没有完全了解它之前会是一个陌生的概念。为了发挥Groovy最大功效,或者了解任何其他Groovy代码,它将肯定让你感觉轻松。不只是“一次婚礼上遇见它们”的轻松,而是“邀请它们参加周末烧烤”的轻松。(注原文: Not just “met them once at a wedding” comfortable, but “invit ...
- 22:28
- 浏览 (719)
- 评论 (1)
- 分类: Groovy on Grails
- 发布在 Groovy on Grails 圈子
h4. Using the render method to output XML
h4. 使用render输出XML
Grails' supports a few different ways to produce XML and JSON responses. The first one covered is via the [render|controllers] method.
Grails提供一些不同的方法来产生XML和JSON响应。第一个是隐式的通过[render|controllers]方法。
The @render@ method can be passed a bl ...
- 15:19
- 浏览 (1811)
- 评论 (0)
- 分类: Groovy on Grails
- 发布在 JSF 圈子
- 浏览: 44021 次
- 性别:

- 来自: 郴州

- 详细资料
搜索本博客
我的相册
QQ截图未命名3
共 37 张
共 37 张
最近加入圈子
最新评论
-
JSF请求处理生命周期(一 ...
我觉得1、需要解释概念2、需要用实例说话3、概念说得不错
-- by lysmart_8 -
grails and tinymce
笨狗啊,你是一心放在在groovy&grails上了啊,不错,不错。学习了。
-- by rockjava -
Grails中文文档beta发布
感谢辛苦的劳动!
-- by vdgame -
那天好友对我说他哭了
好....
-- by qieren -
Grails中文文档beta发布
-- by zengsun






评论排行榜