亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? formtaglib.groovy

?? grails用戶使用指南
?? GROOVY
字號:
/* Copyright 2004-2005 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT c;pWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */import org.springframework.validation.Errors;import org.springframework.context.NoSuchMessageException;import org.springframework.web.servlet.support.RequestContextUtils as RCU;import org.codehaus.groovy.grails.commons.GrailsClassUtils as GCU; /** *  A  tag lib that provides tags for working with form controls * * @author Graeme Rocher * @since 17-Jan-2006 */class FormTagLib {	/**	 * Creates a new text field	 */	def textField = { attrs ->		attrs.type = "text"  		attrs.tagName = "textField" 		field(attrs)	}	/**	 * Creates a hidden field	 */	def hiddenField = { attrs ->		attrs.type = "hidden"		attrs.tagName = "hiddenField"		field(attrs)	}	/**	 * Creates a submit button	 */	def submitButton = { attrs ->		attrs.type = "submit"		attrs.tagName = "submitButton"		field(attrs)	}	/**	 * A general tag for creating fields	 */	def field = { attrs ->          if(!attrs.name && !attrs.field) {            throwTagError("Tag [$tagName] is missing required attribute [name] or [field]")        }				attrs.remove('tagName')				if(attrs.field) 			attrs.name = attrs.remove('field') 		  	attrs.id = (!attrs.id ? attrs.name : attrs.id)		def val = attrs.remove('bean')		if(val) {                               			if(attrs.name.indexOf('.'))	    		attrs.name.split('\\.').each { val = val?."$it" }	        else {		    	val = val[name]			}			attrs.value = val				}				attrs.value = (attrs.value ? attrs.value : "")		out << "<input type='${attrs.remove('type')}' "        attrs.each { k,v ->            out << k << "=\"" << v << "\" "        }				out << "/>"			}    /**     *  General linking to controllers, actions etc. Examples:     *     *  <g:form action="myaction">...</gr:form>     *  <g:form controller="myctrl" action="myaction">...</gr:form>     */    def form = { attrs, body ->        out << "<form action=\""        // create the link        createLink(attrs)        out << '\" '        // default to post        if(!attrs['method']) {            out << 'method="post" '        }        // process remaining attributes        attrs.each { k,v ->            out << k << "=\"" << v << "\" "        }        out << ">"        // output the body        body()        // close tag        out << "</form>"    }    /**     * Creates a submit button that submits to an action in the controller specified by the form action     * The value of the action attribute is translated into the action name, for example "Edit" becomes     * "edit" or "List People" becomes "listPeople"     *     *  <g:actionSubmit value="Edit" />     *     */    def actionSubmit = { attrs ->        out << '<input type="submit" name="_action" '        def value = attrs.remove('value')        if(value) {             out << "value='${value}'"        }        // process remaining attributes        attrs.each { k,v ->            out << k << "=\"" << v << "\" "        }        // close tag        out.println '/>'    }    /**     * A simple date picker that renders a date as selects     * eg. <g:datePicker name="myDate" value="${new Date()}" />     */    def datePicker = { attrs ->        def value = (attrs['value'] ? attrs['value'] : new Date())        def name = attrs['name']        final PRECISION_RANKINGS = ["year":0, "month":10, "day":20, "hour":30, "minute":40]        def precision = (attrs['precision'] ? PRECISION_RANKINGS[attrs['precision']] : PRECISION_RANKINGS["minute"])        def c = null        if(value instanceof Calendar) {            c = value        }        else {            c = new GregorianCalendar();            c.setTime(value)        }        def day = c.get(GregorianCalendar.DAY_OF_MONTH)        def month = c.get(GregorianCalendar.MONTH)        def year = c.get(GregorianCalendar.YEAR)        def hour = c.get(GregorianCalendar.HOUR_OF_DAY)        def minute = c.get(GregorianCalendar.MINUTE)        def dfs = new java.text.DateFormatSymbols(RCU.getLocale(request))        out << "<input type='hidden' name='${name}' value='struct' />"        // create day select        if (precision >= PRECISION_RANKINGS["day"]) {            out.println "<select name='${name}_day'>"            if (day > 1) {                for(i in 1..(day-1)) {                       out.println "<option value='${i}'>${i}</option>"                }            }            out.println "<option value='${day}' selected='selected'>${day}</option>"            for(i in (day+1)..31) {                   out.println "<option value='${i}'>${i}</option>"            }            out.println '</select>'        }        // create month select        if (precision >= PRECISION_RANKINGS["month"]) {            out.println "<select name='${name}_month'>"            dfs.months.eachWithIndex { m,i ->                if(m) {                    def monthIndex = i + 1                    out << "<option value='${monthIndex}'"                    if(month == i) out << " selected='selected'"                    out << '>'                    out << m                    out.println '</option>'                }            }            out.println '</select>'        }        // create year select        if (precision >= PRECISION_RANKINGS["year"]) {            out.println "<select name='${name}_year'>"            for(i in (year - 100)..(year-1)) {                out.println "<option value='${i}'>${i}</option>"            }            out.println "<option value='${year}' selected='selected'>${year}</option>"            for(i in (year + 1)..(year+100)) {                out.println "<option value='${i}'>${i}</option>"            }            out.println '</select>'        }        // do hour select        if (precision >= PRECISION_RANKINGS["hour"]) {            out.println "<select name='${name}_hour'>"            for(i in 0..23) {                def h = '' + i                if(i < 10) h = '0' + h                out << "<option value='${h}' "                if(hour == h) out << "selected='selected'"                out << '>' << h << '</option>'                out.println()            }            out.println '</select> :'            // If we're rendering the hour, but not the minutes, then display the minutes as 00 in read-only format            if (precision < PRECISION_RANKINGS["minute"]) {                out.println '00'            }        }        // do minute select        if (precision >= PRECISION_RANKINGS["minute"]) {            out.println "<select name='${name}_minute'>"            for(i in 0..59) {                def m = '' + i                if(i < 10) m = '0' + m                out << "<option value='${m}' "                if(minute == m) out << "selected='selected'"                out << '>' << m << '</option>'                out.println()            }            out.println '</select>'        }    }    /**     *  A helper tag for creating TimeZone selects     * eg. <g:timeZoneSelect name="myTimeZone" value="${tz}" />     */    def timeZoneSelect = { attrs ->        attrs['from'] = TimeZone.getAvailableIDs();        attrs['value'] = (attrs['value'] ? attrs['value'].ID : TimeZone.getDefault().ID )        // set the option value as a closure that formats the TimeZone for display        attrs['optionValue'] = {            TimeZone tz = TimeZone.getTimeZone(it);            def shortName = tz.getDisplayName(tz.inDaylightTime(date),TimeZone.SHORT);            def longName = tz.getDisplayName(tz.inDaylightTime(date),TimeZone.LONG);            def offset = tz.rawOffset;            def hour = offset / (60*60*1000);            def min = Math.abs(offset / (60*1000)) % 60;            return "${shortName}, ${longName} ${hour}:${min}"        }        // use generic select        select( attrs )    }    /**     *  A helper tag for creating locale selects     *     * eg. <g:localeSelect name="myLocale" value="${locale}" />     */    def localeSelect = {attrs ->        attrs['from'] = Locale.getAvailableLocales()        attrs['value'] = (attrs['value'] ? attrs['value'] : RCU.getLocale(request) )        // set the key as a closure that formats the locale        attrs['optionKey'] = { "${it.language}_${it.country}" }        // set the option value as a closure that formats the locale for display        attrs['optionValue'] = { "${it.language}, ${it.country},  ${it.displayName}" }        // use generic select        select( attrs )    }    /**     * A helper tag for creating currency selects     *     * eg. <g:currencySelect name="myCurrency" value="${currency}" />     */    def currencySelect = { attrs, body ->        if(!attrs['from']) {            attrs['from'] = ['EUR', 'XCD','USD','XOF','NOK','AUD','XAF','NZD','MAD','DKK','GBP','CHF','XPF','ILS','ROL','TRL']        }        def currency = (attrs['value'] ? attrs['value'] : Currency.getInstance( RCU.getLocale(request) ))        attrs['value'] = currency.currencyCode        // invoke generic select        select( attrs )    }    /**     * A helper tag for creating HTML selects     *     * Examples:     * <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" />     */    def select = { attrs ->        def from = attrs.remove('from')        def keys = attrs.remove('keys')        def optionKey = attrs.remove('optionKey')        def optionValue = attrs.remove('optionValue')        def value = attrs.remove('value')        out << "<select name='${attrs.remove('name')}' "        // process remaining attributes        attrs.each { k,v ->            out << k << "=\"" << v << "\" "        }        out << '>'        out.println()        // create options from list        if(from) {            from.eachWithIndex { el,i ->                out << '<option '                if(keys) {                    out << 'value="' << keys[i] << '" '                    if(keys[i] == value) {                        out << 'selected="selected" '                    }                }               else if(optionKey) {                    def keyValue = null                    if(optionKey instanceof Closure) {                        keyValue = optionKey(el)                         out << 'value="' << keyValue << '" '                    }                    else if(el !=null && optionKey == 'id' && grailsApplication.getGrailsDomainClass(el.getClass().name)) {                        keyValue = el.ident()                        out << 'value="' << keyValue << '" '                    }                    else {                        keyValue = el.properties[optionKey]                        out << 'value="' << keyValue << '" '                    }                    if(keyValue == value) {                        out << 'selected="selected" '                    }                }                else {                    out << "value='${el}' "                    if(el == value) {                        out << 'selected="selected" '                    }                }                out << '>'                if(optionValue) {                    if(optionValue instanceof Closure) {                         out << optionValue(el)                    }                    else {                        out << el.properties[optionValue]                    }                }                else {                    def s = el.toString()                    if(s) out << s                }                out << '</option>'                out.println()            }        }        // close tag        out << '</select>'    }    /**     * A helper tag for creating checkboxes     **/    def checkBox = { attrs ->          def value = attrs.remove('value')          def name = attrs.remove('name')          if(!value) value = false          out << '<input type="hidden" '          out << "name=\"_${name}\" />"          out << '<input type="checkbox" '          out << "name='${name}' "          if(value) {                out << 'checked="checked" '          }          out << "value='true' "        // process remaining attributes        attrs.each { k,v ->            out << k << "=\"" << v << "\" "        }        // close the tag, with no body        out << ' />'    }    /**     * A helper tag for creating radio buttons     */     def radio = { attrs ->          def value = attrs.remove('value')          def name = attrs.remove('name')          def checked = (attrs.remove('checked') ? true : false)          out << '<input type="radio" '          out << "name='${name}' "          if(checked) {                out << 'checked="checked" '          }          out << "value=\"$value\" "        // process remaining attributes        attrs.each { k,v ->            out << k << "=\"" << v << "\" "        }        // close the tag, with no body        out << ' ></input>'     }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷综合五月天| 91日韩一区二区三区| 一本在线高清不卡dvd| 日韩片之四级片| 日韩美女久久久| 国产一区二区在线观看视频| 欧美日韩高清一区二区不卡| 亚洲欧洲制服丝袜| 大美女一区二区三区| 精品国产一区二区三区忘忧草| 亚洲一级二级在线| 91亚洲国产成人精品一区二三| 久久新电视剧免费观看| 蜜桃视频一区二区三区| 91精品欧美久久久久久动漫| 亚洲精品videosex极品| 一本色道久久综合精品竹菊| 国产精品麻豆久久久| 激情综合网激情| 2020国产精品| 国内精品久久久久影院薰衣草| 678五月天丁香亚洲综合网| 一区二区三区欧美日| 99精品欧美一区二区蜜桃免费| 国产喷白浆一区二区三区| 国产在线精品一区在线观看麻豆| 欧美一区二区福利视频| 日本欧美一区二区| 91精品国产综合久久精品图片 | 欧美日产国产精品| 一区二区三区不卡在线观看 | 久久看人人爽人人| 精品一区二区三区视频在线观看 | 韩国v欧美v日本v亚洲v| 久久久久久97三级| 成人毛片视频在线观看| 国产精品狼人久久影院观看方式| 成人激情小说乱人伦| 国产精品久久三区| 91小视频在线免费看| 亚洲一区在线播放| 欧美日本国产视频| 日韩一区精品字幕| 欧美成人精品福利| 国产成人精品三级麻豆| 亚洲日穴在线视频| 欧美另类久久久品| 黄色成人免费在线| 国产精品福利影院| 91黄视频在线观看| 日本91福利区| 欧美激情一二三区| 欧美日韩精品电影| 国产一区二区影院| 亚洲精品视频观看| 日韩天堂在线观看| 成人精品国产免费网站| 亚洲综合成人在线视频| 欧美成人三级电影在线| www.亚洲人| 日产国产高清一区二区三区 | 一区二区三区高清在线| 555夜色666亚洲国产免| 国产精品亚洲综合一区在线观看| 亚洲欧洲av在线| 337p亚洲精品色噜噜狠狠| 国产精品99久久久久| 亚洲高清中文字幕| 国产午夜精品理论片a级大结局| 91美女片黄在线观看91美女| 美国十次综合导航| 亚洲男人天堂av网| 精品欧美一区二区在线观看| 91免费看片在线观看| 麻豆精品一区二区三区| 一区二区三区日本| 中文字幕电影一区| 日韩一区二区电影| 91黄色免费版| 国产91丝袜在线播放| 琪琪久久久久日韩精品| 亚洲免费在线播放| 久久久国产午夜精品| 欧美一区国产二区| 91亚洲精品一区二区乱码| 国产乱码字幕精品高清av| 五月激情丁香一区二区三区| 亚洲人成网站色在线观看| ww久久中文字幕| 91精品久久久久久久99蜜桃 | 精品视频在线免费| 北条麻妃一区二区三区| 国产乱人伦偷精品视频免下载 | 蜜乳av一区二区| 亚洲va韩国va欧美va| 中文字幕一区二区不卡| 久久蜜桃一区二区| 日韩一区二区免费电影| 欧美日韩国产中文| 欧美亚洲国产一区在线观看网站| 成人黄色综合网站| 国产大陆a不卡| 国产一区在线视频| 精品一区二区三区在线播放| 久久精品国产亚洲一区二区三区| 亚洲福利电影网| 亚洲一区二区成人在线观看| 亚洲精品国产高清久久伦理二区| 国产精品麻豆网站| 中文字幕一区二区三区四区不卡| 国产欧美一区二区三区在线老狼| 久久毛片高清国产| 国产亚洲欧美日韩在线一区| 久久亚区不卡日本| 久久在线观看免费| 日本一区二区久久| 国产精品日韩精品欧美在线 | 久久综合狠狠综合| 国产亚洲欧美激情| 国产精品初高中害羞小美女文 | 国产精品沙发午睡系列990531| 久久久久久久久久久久久久久99| 久久精品欧美日韩精品| 国产精品免费看片| 亚洲另类色综合网站| 一区二区三区四区不卡视频| 午夜精品久久久| 精品一区二区三区在线观看| 成人小视频免费观看| 97超碰欧美中文字幕| 欧美色网站导航| 欧美一级黄色录像| 国产日韩欧美激情| 亚洲欧美另类小说视频| 亚洲一区二区三区在线| 麻豆成人久久精品二区三区红 | 亚洲天堂2016| 性久久久久久久| 国产一区二区三区蝌蚪| 99国产精品国产精品毛片| 欧美日韩精品三区| 久久免费电影网| 夜夜操天天操亚洲| 韩国v欧美v日本v亚洲v| 99精品在线免费| 欧美一区二区啪啪| 中文无字幕一区二区三区| 亚洲综合区在线| 激情欧美一区二区| 色综合天天狠狠| 日韩欧美国产系列| 亚洲视频 欧洲视频| 精油按摩中文字幕久久| 色88888久久久久久影院野外| 欧美一区二区免费观在线| 中文字幕在线不卡视频| 久久精品噜噜噜成人av农村| 色偷偷久久一区二区三区| 欧美白人最猛性xxxxx69交| 亚洲精品自拍动漫在线| 国产成人啪午夜精品网站男同| 欧美三级三级三级| 中文一区二区完整视频在线观看| 日韩高清不卡在线| 91麻豆精品视频| 国产视频一区二区在线| 首页欧美精品中文字幕| 色综合久久99| 国产精品沙发午睡系列990531| 久久精品免费观看| 欧美日本韩国一区二区三区视频 | 欧美性xxxxxxxx| 国产精品久久久久久妇女6080 | 国产精品18久久久久久久网站| 欧美日韩中文另类| 亚洲人成小说网站色在线| 国产成人av影院| 久久色.com| 看电影不卡的网站| 日韩欧美国产综合| 美脚の诱脚舐め脚责91 | 日韩一区在线看| 国产剧情在线观看一区二区| 欧美成人性战久久| 免费人成在线不卡| 欧美日韩国产电影| 亚洲自拍偷拍av| 欧亚一区二区三区| 亚洲精品美国一| 91福利国产成人精品照片| 最新欧美精品一区二区三区| voyeur盗摄精品| 国产精品九色蝌蚪自拍| 99精品欧美一区二区三区综合在线| 亚洲国产精品传媒在线观看| 国产99久久久国产精品| 国产欧美日韩另类视频免费观看| 国产精品18久久久久久久久| 久久精品无码一区二区三区| 国产成人免费在线视频|