亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品伦理在线| 成人美女视频在线观看18| 色婷婷综合五月| 日韩高清一区二区| 久久久久久免费网| 精品一区二区在线免费观看| 亚洲国产美国国产综合一区二区| 粗大黑人巨茎大战欧美成人| 日韩欧美成人一区| 欧美嫩在线观看| 视频一区二区三区中文字幕| 欧美日韩亚洲丝袜制服| 国产精品欧美极品| 蜜臀av性久久久久蜜臀aⅴ| 国产精品伦一区二区三级视频| 国产.精品.日韩.另类.中文.在线.播放| 国产欧美va欧美不卡在线| 久久午夜老司机| 玖玖九九国产精品| 国产欧美精品一区二区色综合 | 欧美日韩三级在线| 国产精品欧美久久久久无广告| 在线观看中文字幕不卡| 午夜在线电影亚洲一区| 国产精品77777| 中文字幕制服丝袜成人av| 666欧美在线视频| 色欧美日韩亚洲| 欧美网站一区二区| 男女视频一区二区| 亚洲美女免费视频| 欧美国产欧美综合| 精品国精品自拍自在线| 欧美日韩中文字幕一区| 国产在线精品一区二区夜色 | 欧美精品一区二区三区视频| 91女神在线视频| 亚洲国产精品影院| 色狠狠色狠狠综合| 综合久久久久综合| 欧美变态tickle挠乳网站| 91.麻豆视频| 欧美三电影在线| 亚洲精品菠萝久久久久久久| 日本一区二区免费在线观看视频| 国内外成人在线| 久久精品视频免费观看| 国产福利91精品一区二区三区| 精品sm在线观看| 国产成人精品免费| 亚洲欧美日韩在线不卡| 欧美午夜宅男影院| 麻豆精品视频在线观看免费| 久久免费视频一区| aaa欧美日韩| 天堂va蜜桃一区二区三区| 日韩精品一区二区三区蜜臀| 国产一区二区福利| 亚洲欧洲综合另类在线| 欧美日韩www| 国产一区二区三区四区在线观看| 中文无字幕一区二区三区| 91在线观看高清| 青青草91视频| 国产精品久久久久久久久免费桃花 | 成人一级视频在线观看| 一区二区中文视频| 67194成人在线观看| 东方aⅴ免费观看久久av| 亚洲人成伊人成综合网小说| 欧美天堂一区二区三区| 麻豆久久久久久| 亚洲动漫第一页| 国产日韩欧美亚洲| 91在线免费播放| 亚洲免费在线观看视频| 激情五月婷婷综合| 91精品国产aⅴ一区二区| 一区二区三区资源| 久久99精品久久久久久| 欧美日韩一区国产| 中文一区二区在线观看| 九九国产精品视频| 久久久久99精品国产片| 日本国产一区二区| 国产精品乱人伦一区二区| 精品视频色一区| 成人美女视频在线观看| 蜜臀精品久久久久久蜜臀| 亚洲视频图片小说| 国产午夜精品久久久久久久| 欧美日韩免费观看一区三区| 成人深夜福利app| 国精产品一区一区三区mba桃花| 亚洲毛片av在线| 中文字幕日韩精品一区| 久久夜色精品一区| 91精品国产综合久久久久久久久久 | 亚洲国产精品一区二区久久恐怖片| 久久久一区二区三区| 日韩一卡二卡三卡四卡| 欧美日韩你懂的| 国产一区二区三区美女| 在线中文字幕不卡| 成年人午夜久久久| 成人永久aaa| 国产一区二区看久久| 精品在线一区二区| 美女性感视频久久| 美女视频一区二区三区| 婷婷久久综合九色综合伊人色| 亚洲三级免费电影| 日韩美女视频一区二区| 中文字幕久久午夜不卡| 久久综合色婷婷| 久久久一区二区三区| 久久久久国产精品免费免费搜索| 日韩精品一区二区三区三区免费 | 国产超碰在线一区| 久久99久久精品| 激情六月婷婷久久| 国产在线不卡一区| 国产精品白丝jk黑袜喷水| 国产一二精品视频| 国产高清不卡一区| 成人美女在线视频| 在线看国产一区| 欧美乱熟臀69xxxxxx| 欧美精品久久久久久久多人混战| 欧美日韩aaa| 欧美电影免费观看高清完整版 | 亚洲图片另类小说| 国产精品理伦片| 中文字幕亚洲在| 亚洲综合区在线| 日韩激情一二三区| 免费视频最近日韩| 久久99精品一区二区三区三区| 国产精品一二三区| 成人免费高清在线观看| 欧美在线视频你懂得| 日韩欧美一级精品久久| 久久久美女艺术照精彩视频福利播放| 国产欧美一区二区三区在线老狼| 国产精品国产三级国产普通话蜜臀 | 亚洲女女做受ⅹxx高潮| 亚洲成人一区在线| 精品一区二区三区在线播放| 东方欧美亚洲色图在线| 欧美色倩网站大全免费| 精品国产乱码久久久久久蜜臀| 国产精品久久久久7777按摩| 五月婷婷综合在线| 国产成人免费视频网站| 色一情一伦一子一伦一区| 欧美一区二区成人6969| 国产精品久久看| 日韩精品视频网站| 国产高清精品网站| 欧美一区二区三区男人的天堂| 久久九九全国免费| 日韩av一区二区在线影视| 成人免费电影视频| 欧美一级欧美三级| 亚洲人成网站在线| 大胆欧美人体老妇| 精品奇米国产一区二区三区| 亚洲精品视频在线| 国产激情一区二区三区| 欧美精品在线一区二区| 亚洲欧美日韩在线不卡| 国产精品一品视频| 欧美一区二区成人6969| 亚洲最大的成人av| 暴力调教一区二区三区| 日韩一区二区不卡| 亚洲一二三级电影| 成人高清免费观看| 久久久久久免费毛片精品| 日韩精品午夜视频| 欧美天天综合网| 一区二区在线观看不卡| 成人性生交大片免费看视频在线| 欧美一区二视频| 亚洲国产欧美日韩另类综合| 日韩一区二区三区免费看 | 日本久久一区二区| 欧美经典一区二区| 国产成人一级电影| 久久综合成人精品亚洲另类欧美| 偷拍一区二区三区| 欧美日本一道本在线视频| 亚洲免费视频中文字幕| 色综合咪咪久久| 亚洲欧洲日韩一区二区三区| 成人伦理片在线| 国产精品久久午夜| 99国产麻豆精品| 玉足女爽爽91| 欧美日韩黄色影视|