<g:actionSubmit value=""/>
提交按鈕 <g:actionSubmit action="Edit" value="Some label for editing" />
<g:actionSubmitImage value=""/>
圖像提交按鈕 <g:actionSubmitImage src="/images/submitButton.gif" action="Edit" />
<g:applyLayout></g:applyLayout>
創(chuàng)建layout
<g:applyLayout name="myLayout">some text</g:applyLayout>
<g:applyLayout name="myLayout" template="mytemplate" />
<g:applyLayout name="myLayout" url="http://www.google.com" />
<g:applyLayout name="myLayout" action="myAction" controller="myController">
<g:checkBox name=""/>復(fù)選框
<g:collect></g:collect>枚舉一個(gè)集合并根據(jù)定義的expr參數(shù)改變結(jié)果
<g:cookie name=""/>得到一個(gè)cookie的值
<g:country code=""/>根據(jù)國家代碼輸出國家名稱
<g:countrySelect/>
顯示國家選擇下拉框combo box
<g:countrySelect name="myCountry" value="${country}" />
<g:createLink/>從一組屬性里創(chuàng)建一個(gè)Grails應(yīng)用鏈接
<g:createLinkTo/>
創(chuàng)建一個(gè)鏈接到資源<link type="text/css" href="${createLinkTo(dir:'css',file:'main.css')}" />
<g:currencySelect/>
顯示幣種選擇下拉框combo box
<g:currencySelect name="myCurrency" value="${currency}" />
<g:datePicker name=""/>
日期選擇器
<g:datePicker name="myDate" value="${new Date()}" />
<g:def/>在gsp文件中定義變量,作為<set>的替代
<g:each></g:each>遍歷指定集合中的每個(gè)對(duì)象
<g:eachError></g:eachError>循環(huán)遍歷每個(gè)錯(cuò)誤指定的bean或model
<g:else></g:else>else
<g:elseif></g:elseif>else if
<g:encodeAs codec=""></g:encodeAs>指定編碼格式的encode
<g:escapeJavascript></g:escapeJavascript>
<g:escapeJavascript>This is some "text" to be escaped</g:escapeJavascript>
<g:external/>
Render the appropriate kind of external link for use in <head> based on the type of the URI. For JS will render <script> tags, for CSS will render <link> with the correct rel, and so on for icons.
<g:field type=""/> 創(chuàng)建field
<g:fieldError bean="" field=""></g:fieldError>顯示錯(cuò)誤信息
<g:fieldError bean="${book}" field="title" />
<g:fieldValue bean="" field=""/>得到字段的值
<g:fieldValue bean="${book}" field="title" />
<g:findall></g:findall> findall method
<g:form></g:form>Form
<g:form action="myaction">...</g:form>
<g:form controller="myctrl" action="myaction">...</g:form>
<g:formatBoolean boolean=""/>
輸出給定布爾作為指定的文本標(biāo)簽。如果true和false選項(xiàng)沒有給出判斷强衡,然后使用默認(rèn)的標(biāo)簽輸出擦秽。
<g:formatBoolean boolean="${myBoolean}" />
<g:formatBoolean boolean="${myBoolean}" true="True!" false="False!" />
<g:formatDate/>輸出指定的日期格式
<g:formatDate date="${myDate}" format="yyyy-MM-dd HH:mm" />
<g:formatNumber number=""/>輸出指定的數(shù)字格式
<g:formatNumber number="${myNumber}" format="###,##0" />
<g:formRemote name="" url=""></g:formRemote>
使用JavaScript提供序列化參數(shù)并提交通過ajax異步調(diào)用。
<g:grep></g:grep>過濾
采用常規(guī)的JDK grep方法遍歷每個(gè)元素指定對(duì)象的符合規(guī)定的“過濾”屬性。
過濾器可以是不同的實(shí)例感挥,如類缩搅,正則表達(dá)式模式等。
<g:hasErrors></g:hasErrors>檢查是否有錯(cuò)
<g:header name=""/>請(qǐng)求name的值?
<g:hiddenField name=""/>隱藏的field
<g:if></g:if>if
<g:ifPageProperty name=""></g:ifPageProperty>
若頁面屬性存在,則..
<g:ifPageProperty name="meta.index">body to invoke</ g:ifPageProperty>
<g:ifPageProperty name="meta.index" equals="blah">body to invoke</g:ifPageProperty>
<g:img/>顯示照片
<g:include/>存在另一個(gè)controller/action在當(dāng)前response中
<g:include controller="foo" action="test"></g:include>
<g:javascript></g:javascript>js腳本
<g:javascript>alert('hello')</g:javascript>
<g:join/>連接字符串
<g:layoutBody/>顯示Body
<g:layoutHead/>顯示Head
<g:layoutTitle/>顯示Title
<g:layoutTitle default="The Default title" />
<g:link></g:link>link
<g:localeSelect name="myLocale" value="${locale}" />locate 所在區(qū)域
<g:message/>顯示錯(cuò)誤消息
<g:meta name=""/>從application.properties load application metadata
<g:pageProperty/>顯示頁面屬性
<g:pageProperty default="defaultValue" name="body.onload" />
<g:paginate total=""/>分頁
<g:paginate total="${Account.count()}" />
<g:passwordField name=""/>密碼文本框
<g:radio name="" value=""/>radio button 單選按鈕
<g:radioGroup values="" name=""></g:radioGroup>radio button group 一組單選按鈕
<g:remoteField name=""/> remote link
<g:remoteFunction/> remote function
<g:remoteLink></g:remoteLink> remote link
<g:render template=""></g:render>渲染圖中集合的一個(gè)模板
<g:render template="atemplate" collection="${users}" />
<g:render template="atemplate" model="[user:user,company:company]" />
<g:render template="atemplate" bean="${user}" />
<g:renderErrors/>顯示錯(cuò)誤
<g:renderException exception=""/>顯示異常
<g:renderInput></g:renderInput>顯示輸入?
<g:resource/>創(chuàng)建一個(gè)鏈接到資源
<link type="text/css" href="${resource(dir:'css',file:'main.css')}" />
<g:select name="" from=""/>dropdown list下拉列表
<g:select name="user.age" from="${18..65}" value="${age}" />
<g:select name="user.company.id" from="${Company.list()}" value="${user?.company.id}" optionKey="id" />
<g:set></g:set>給變量賦值
<g:setProvider></g:setProvider>set provider
<g:sortableColumn/>可排序的column
<g:sortableColumn property="title" title="Title" />
<g:sortableColumn property="title" title="Title" style="width: 200px" />
<g:sortableColumn property="title" titleKey="book.title" />
<g:sortableColumn property="releaseDate" defaultOrder="desc" title="Release Date" />
<g:sortableColumn property="releaseDate" defaultOrder="desc" title="Release Date" titleKey="book.releaseDate" />
<g:submitButton name=""/>提交按鈕
<g:submitToRemote></g:submitToRemote>Ajax提交按鈕
<g:textArea name=""></g:textArea>textarea
<g:textField name=""/> textfield
<g:timeZoneSelect name=""/>所在區(qū)域的時(shí)區(qū)
<g:timeZoneSelect name="myTimeZone" value="${tz}" />
<g:unless></g:unless>除非
<g:uploadForm></g:uploadForm>上傳表單
<g:validate form="" againstClass=""></g:validate>驗(yàn)證
<g:while></g:while>while
<g:withTag name=""></g:withTag>創(chuàng)建標(biāo)簽