<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 431,  comments - 344,  trackbacks - 0

    This plugin provides integration with the Yahoo! UI Library. When installing the plugin, it downloads and installs automatically the latest YUI 2.5.2 distribution in your application, and registers itself to be used with the adapative AJAX tags. It also contains two helper tags to easily include additional YUI javascript and css files as well.

    Installation

    To install the YUI plugin type this command from your project's root folder:

    grails install-plugin yui
    The complete YUI distribution is downloaded and installed under your project's web-appjsyui2.5.2 folder.

    Usage

    To use Grails' adaptive AJAX support just add the folowing line in the head section:

    <g:javascript library="yui" />
    If you want to include additional YUI javascript and css files include them using:
    <yui:javascript dir="calendar" file="calendar-min.js" />
    <yui:javascript dir="calendar" file="calendar-min.js" version="2.5.2" />
    // version to be used in case multiple version installed
    <yui:stylesheet dir="calendar/assets" file="calendar.css" />
    Refer to the Ajax section of the Grails reference documentation for usage.

    Overriding default javascript files

    By default only yahoo-dom-event.js and connection-min.js are included when using <g:javascript library="yui" />. Adding additional libraries to the default list can be done in a BootStrap (+) class:

    import org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib
    

    class BootStrap { def init = { servletContext -> JavascriptTagLib.LIBRARY_MAPPINGS.yui += ["yui/2.5.2/calendar/calendar-min", "yui/2.5.2/container/container-min"] } def destroy = { } }

    It's also possible to replace all default included javascript libraries. For example if you want to use the YUI debug javascript files in development mode:
    import grails.util.GrailsUtil
    import org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib
    

    class BootStrap { def init = { servletContext -> if (GrailsUtil.isDevelopmentEnv()) { JavascriptTagLib.LIBRARY_MAPPINGS.yui = ["yui/2.5.2/yahoo/yahoo-debug", "yui/2.5.2/dom/dom-debug", "yui/2.5.2/event/event-debug", "yui/2.5.2/connection/connection-debug"] } } def destroy = { } }

    Serving YUI Files from Yahoo! Servers

    It's also possible to serve the javascript from the Yahoo! servers. First delete the yui folder from web-appjs after installing the plugin. Then, in a BootStrap class, override the mapping which contains the javascript files to include by default:

    import org.codehaus.groovy.grails.plugins.web.taglib.JavascriptTagLib
    

    class BootStrap { def init = { servletContext -> JavascriptTagLib.LIBRARY_MAPPINGS.yui = [] } def destroy = { } }

    The only drawback is that you need to include the references to the javascript files manually. Probably the easiest way is to do this in the main.gsp layout.

    Upgrading

    If you want to upgrade:

    • Delete the plugin from the project's plugins folder
    • (Optional) Delete the previous YUI version folder from web-appjsyui
    • Re-install the plugin by executing grails install-plugin yui
    posted on 2008-07-29 22:38 周銳 閱讀(523) 評(píng)論(0)  編輯  收藏 所屬分類: Groovy&Grails
    主站蜘蛛池模板: 毛片免费在线播放| 免费无码又爽又刺激高潮视频 | 亚洲性无码av在线| 美女视频黄的免费视频网页 | 一级毛片在播放免费| 免费人成视频在线观看视频| 男女猛烈xx00免费视频试看| 免费看少妇作爱视频| 亚洲中文字幕无码av| 全免费A级毛片免费看网站| 亚洲国产AV一区二区三区四区| 色www永久免费视频| 杨幂最新免费特级毛片| 久久久无码精品亚洲日韩软件 | 污网站在线免费观看| 亚洲成av人在片观看| 在线观看黄片免费入口不卡| 国产亚洲福利精品一区| 99爱视频99爱在线观看免费| 91亚洲国产成人久久精品 | 亚洲日韩激情无码一区| 无码国产精品一区二区免费3p| 亚洲国产亚洲片在线观看播放| 97热久久免费频精品99| 亚洲成a人无码亚洲成www牛牛| 亚洲AV无码成人精品区大在线| 一区二区三区在线免费观看视频| 亚洲AV乱码一区二区三区林ゆな| 57pao一国产成永久免费| 亚洲码和欧洲码一码二码三码| 亚洲国产成人a精品不卡在线| 欧洲人免费视频网站在线| 亚洲成a人片在线观看中文app | 午夜亚洲国产理论片二级港台二级 | 久久亚洲私人国产精品| 成全视频免费高清| 国产精品hd免费观看| 亚洲蜜芽在线精品一区| 美女被免费喷白浆视频| 免费无码午夜福利片| 亚洲精品在线电影|