<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片在线观看不卡| 国产国拍精品亚洲AV片| 午夜不卡久久精品无码免费| 国产成人亚洲精品蜜芽影院| 亚洲jjzzjjzz在线播放| 亚洲第一成年男人的天堂| 国产精品亚洲二区在线观看 | 亚洲第一区精品日韩在线播放| 114一级毛片免费| 国产激情免费视频在线观看| 九九九精品视频免费| 亚洲A∨精品一区二区三区下载| 亚洲最新黄色网址| 久久精品国产亚洲av日韩| 亚洲精品无码成人片久久| 亚洲精品网站在线观看不卡无广告| 成人a免费α片在线视频网站| 1a级毛片免费观看| 99精品国产成人a∨免费看| a毛片全部免费播放| 国产无限免费观看黄网站| 一边摸一边桶一边脱免费视频 | 天天天欲色欲色WWW免费| 日韩版码免费福利视频| 亚洲一区二区三区免费视频| 免费日本一区二区| 久久精品乱子伦免费| 美女被cao网站免费看在线看| a级午夜毛片免费一区二区| 久久精品无码免费不卡| 久久国产福利免费| a级毛片免费全部播放| 国产一区二区三区免费观看在线| 91免费在线视频| 美女内射无套日韩免费播放| 久久精品无码专区免费东京热| 8x8×在线永久免费视频| 黄在线观看www免费看| 男人的好看免费观看在线视频| 成年男女免费视频网站| 日韩a级毛片免费视频|