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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 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>'     }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国模大尺度一区二区三区| 欧美一级一级性生活免费录像| 国产亚洲欧美中文| 国产一区二区三区四区五区入口| 欧美成人女星排行榜| 久久精品噜噜噜成人88aⅴ| 日韩视频在线你懂得| 国产在线国偷精品免费看| 精品国产一区二区三区四区四 | av午夜精品一区二区三区| 欧美国产精品中文字幕| 93久久精品日日躁夜夜躁欧美| 一区二区三区在线看| 69精品人人人人| 国产精品一区在线| 亚洲色图在线视频| 91精品国产欧美一区二区成人| 精品制服美女丁香| 国产精品国产馆在线真实露脸| 91久久精品国产91性色tv| 日韩电影一区二区三区| 国产午夜精品久久久久久免费视| 92国产精品观看| 91网站视频在线观看| 亚洲午夜免费电影| 久久综合九色综合欧美就去吻| 99久久综合精品| 婷婷综合久久一区二区三区| 国产三级精品三级| 欧美性色欧美a在线播放| 老司机免费视频一区二区| 国产精品毛片久久久久久| 7777女厕盗摄久久久| 成人动漫精品一区二区| 亚洲r级在线视频| 欧美国产精品劲爆| 欧美一二三四在线| 99久免费精品视频在线观看 | 日韩精品中文字幕在线不卡尤物| 国产aⅴ综合色| 视频一区中文字幕| 亚洲欧洲精品天堂一级| 日韩精品一区二区三区在线播放| 色综合久久中文综合久久牛| 国产一区二区精品久久| 午夜精品久久久久久久久久久 | 亚洲另类春色国产| 日韩精彩视频在线观看| 亚洲国产精品成人综合 | 亚洲欧美激情插 | 国产精品久久久久久久浪潮网站 | 久久av老司机精品网站导航| 亚洲一级二级三级| 国产精品国产自产拍高清av| 日韩美一区二区三区| 欧美日韩一区成人| 91免费在线看| 国产经典欧美精品| 久久97超碰色| 麻豆精品在线看| 日日夜夜精品免费视频| 亚洲一区二区三区影院| 亚洲美女视频在线| 国产精品久久久久精k8| 国产欧美一区二区在线| 久久久久国产一区二区三区四区| 日韩视频永久免费| 日韩欧美国产一区二区在线播放 | 色哟哟亚洲精品| 99国产精品久久久久| 成人国产一区二区三区精品| 韩国精品在线观看| 看国产成人h片视频| 久久精品噜噜噜成人88aⅴ| 美腿丝袜亚洲色图| 青青草伊人久久| 麻豆91免费看| 美女精品一区二区| 国产在线视频一区二区| 精品在线一区二区| 国产真实乱偷精品视频免| 久久99最新地址| 国产一区二区三区观看| 狠狠色伊人亚洲综合成人| 91精品国产综合久久久蜜臀图片| 91成人国产精品| 欧美午夜寂寞影院| 91精品国产综合久久婷婷香蕉 | 久久不见久久见免费视频1| 精品一区二区av| 国产不卡一区视频| 波波电影院一区二区三区| 99精品国产热久久91蜜凸| 91国模大尺度私拍在线视频| 欧美日韩一区不卡| 日韩一区二区精品葵司在线| 精品欧美乱码久久久久久 | 欧美日韩一区二区三区在线看| 欧美四级电影网| 欧美电影免费提供在线观看| 久久精品免费在线观看| 国产精品国产三级国产有无不卡 | 日韩中文欧美在线| 久久爱www久久做| 99re热视频精品| 777欧美精品| 国产精品私房写真福利视频| 洋洋成人永久网站入口| 蜜臀av一区二区| 94色蜜桃网一区二区三区| 欧美精品v国产精品v日韩精品| 精品处破学生在线二十三| 国产精品久久久久久久午夜片| 亚洲二区视频在线| 国产精品911| 欧美三级日本三级少妇99| 久久久久久久av麻豆果冻| 一二三四社区欧美黄| 国产一区二区三区电影在线观看| 色噜噜狠狠一区二区三区果冻| 日韩一区二区免费在线观看| 亚洲丝袜另类动漫二区| 美女www一区二区| 一本到不卡精品视频在线观看| 日韩欧美卡一卡二| 一区二区三区日韩在线观看| 蜜桃av噜噜一区| 欧美亚洲一区二区三区四区| 久久综合九色综合欧美就去吻| 亚洲一级不卡视频| 成人黄色大片在线观看| 欧美成人一级视频| 亚洲高清不卡在线观看| 成人免费福利片| 精品国产一区久久| 天天色天天爱天天射综合| 波多野结衣亚洲| 久久久久国色av免费看影院| 日韩精品电影一区亚洲| 在线观看91精品国产入口| 国产日韩欧美综合一区| 日日夜夜免费精品视频| 欧美亚洲日本一区| 国产精品久久久久久妇女6080 | 久久亚洲一区二区三区四区| 香蕉久久夜色精品国产使用方法 | 欧美午夜不卡在线观看免费| 国产精品国产馆在线真实露脸 | 日日夜夜精品免费视频| 在线观看区一区二| 中文字幕视频一区二区三区久| 国内精品伊人久久久久av影院| 91精品蜜臀在线一区尤物| 亚洲国产aⅴ成人精品无吗| 91香蕉视频mp4| 国产精品拍天天在线| 国产精品资源网| 久久久亚洲午夜电影| 另类的小说在线视频另类成人小视频在线| 欧美三级一区二区| 夜夜揉揉日日人人青青一国产精品 | 久久er99热精品一区二区| 成人免费在线观看入口| 丰满放荡岳乱妇91ww| 国产亚洲一区字幕| 国产成人综合自拍| 欧美激情中文字幕一区二区| 国产一区二区三区四区五区美女 | 成人午夜视频福利| 亚洲国产精品激情在线观看| 国产传媒一区在线| 国产欧美一二三区| 成人网男人的天堂| 国产精品久久久久久久岛一牛影视| 丰满岳乱妇一区二区三区| 国产精品成人一区二区艾草| 不卡的av电影在线观看| 亚洲女性喷水在线观看一区| 在线观看一区日韩| 亚洲444eee在线观看| 日韩欧美二区三区| 国产精品综合一区二区| 国产精品久久久久久久午夜片| 91麻豆国产在线观看| 亚洲成人免费在线观看| 91精品国产乱码| 国产一区二区在线影院| 欧美国产国产综合| 色婷婷久久久综合中文字幕| 午夜免费久久看| 精品成人一区二区| 成人免费毛片a| 亚洲一区二区3| 精品美女在线播放| 成人国产电影网| 亚洲综合一二区| 精品国产91乱码一区二区三区| 成人小视频在线| 偷拍与自拍一区| 久久久噜噜噜久久人人看 |