GSP page Labels

Source: Internet
Author: User

Gsp--groovy Servers Pages

<g:actionsubmit value= ""/>
Submit button <g:actionsubmit action= "Edit" value= "Some label for editing"/>

<g:actionsubmitimage value= ""/>
Image submit Button <g:actionsubmitimage src= "/images/submitbutton.gif" action= "Edit"/>

<g:applyLayout></g:applyLayout>
Create 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= ""/> check box
<g:collect></g:collect> enumerates a collection and changes the result according to the defined expr parameter
<g:cookie name= ""/> Get the value of a cookie
<g:country code= ""/> Export country name according to country code

<g:countrySelect/>
Show country selection drop-down frame combo box
<g:countryselect name= "Mycountry" value= "${country}"/>

<g:createLink/> Create a Grails app link from a set of properties

<g:createLinkTo/>
Create a link to a resource <link type= "Text/css" href= "${createlinkto (dir: ' CSS ', file: ' Main.css ')}"/>

<g:currencySelect/>
Show currency selection drop-down combo box
<g:currencyselect name= "mycurrency" value= "${currency}"/>

<g:datepicker name= ""/>
Date Selector
<g:datepicker name= "mydate" value= "${new Date ()}"/>

<g:def/> defining variables in the GSP file as an alternative to <set>

<g:each></g:each> iterates through each object in the specified collection

<g:eachError></g:eachError> loops through the bean or model specified by each error

<g:else></g:else>else
<g:elseif></g:elseif>else if
<g:encodeas codec= "" ></g:encodeAs> specify encoding format for 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 with
<g:field type= ""/> Create field

<g:fielderror bean= "" field= "></g:fieldError> display error message
<g:fielderror bean= "${book}" field= "title"/>

<g:fieldvalue bean= "" field= ""/> Get the value of the 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= ""/>
Outputs the given Boolean as the specified text label. If the true and false options are not given, then the default label output is used.
<g:formatboolean boolean= "${myboolean}"/>
<g:formatboolean boolean= "${myboolean}" true= "true!" false= "false!"/>

<g:formatDate/> outputs the specified date format
<g:formatdate date= "${mydate}" format= "Yyyy-mm-dd hh:mm"/>

<g:formatnumber number= ""/> Output the specified number format
<g:formatnumber number= "${mynumber}" format= "###,# #0"/>

<g:formremote name= "" Url= "" ></g:formRemote>
Use JavaScript to provide serialization parameters and commit asynchronous calls through Ajax.

<g:grep></g:grep> Filtration
Use the regular JDK grep method to iterate through the specified "filter" properties of each element's assigned object.
Filters can be different instances, such as classes, regular expression patterns, and so on.

<g:hasErrors></g:hasErrors> Check for errors

<g:header name= ""/> The value of the request name?

<g:hiddenfield name= ""/> hidden Field

<g:if></g:if>if

<g:ifpageproperty name= "" ></g:ifPageProperty>
If the page property exists, then:
<g:ifpageproperty name= "Meta.index" >body to invoke</g:ifpageproperty>
<g:ifpageproperty name= "Meta.index" equals= "blah" >body to invoke</g:ifpageproperty>

<g:img/> Show Photos

<g:include/> there is another controller/action in the current response
<g:include controller= "foo" action= "test" ></g:include>

<g:javascript></g:javascript>js Script
<g:javascript>alert (' Hello ') </g:javascript>

<g:join/> Connection string

<g:layoutBody/> Display Body

<g:layoutHead/> Show Head

<g:layoutTitle/> Show title
<g:layouttitle default= "The default title"/>

<g:link></g:link>link

<g:localeselect name= "Mylocale" value= "${locale}"/>locate area

<g:message/> Display error messages

<g:meta name= ""/> from application.properties Load application metadata

<g:pageProperty/> Show Page Properties
<g:pageproperty default= "defaultvalue" name= "Body.onload"/>

<g:paginate total= ""/> Pagination
<g:paginate total= "${account.count ()}"/>

<g:passwordfield name= ""/> Password text box

<g:radio name= "" value= "/>radio button radio button

<g:radiogroup values= "" Name= "" ></g:radiogroup>radio button Group A set of radio buttons

<g:remotefield name= ""/> Remote link

<g:remoteFunction/> Remote function

<g:remoteLink></g:remoteLink> Remote Link

<g:render template= "" ></g:render> a template for the collection in the render diagram
<g:render template= "Atemplate" collection= "${users}"/>
<g:render template= "Atemplate" model= "[User:user,company:company]"/>
<g:render template= "Atemplate" bean= "${user}"/>

<g:renderErrors/> Display Errors

<g:renderexception exception= ""/> Show exception

<g:renderInput></g:renderInput> display input?

<g:resource/> Create a link to a resource
<link type= "Text/css" href= "${resource (dir: ' CSS ', file: ' Main.css ')}"/>

<g:select name= "" from= "/>dropdown list drop-down 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> Assigning values to variables

<g:setprovider></g:setprovider>set Provider

<g:sortableColumn/> sortable 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= ""/> Submit button

<g:submittoremote></g:submittoremote>ajax Submit button

<g:textarea name= "" ></g:textarea>textarea

<g:textfield name= ""/> TextField

<g:timezoneselect name= ""/> time zone in the area
<g:timezoneselect name= "Mytimezone" value= "${tz}"/>

<g:unless></g:unless> unless

<g:uploadForm></g:uploadForm> Upload a form

<g:validate form= "" againstclass= "" ></g:validate> Verification

<g:while></g:while>while

<g:withtag name= "" ></g:withTag> Create tags

















Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

GSP page Labels

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.