<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 周銳 閱讀(524) 評論(0)  編輯  收藏 所屬分類: Groovy&Grails
    主站蜘蛛池模板: 情侣视频精品免费的国产| 性做久久久久免费观看| 亚洲视频在线观看2018| 四虎成人精品在永久免费| 成人网站免费大全日韩国产| 亚洲美女视频一区二区三区| 嫩草影院免费观看| 国产在线精品观看免费观看| 亚洲国产中文在线二区三区免| 国产免费观看视频| 在线成人爽a毛片免费软件| 亚洲免费视频观看| 久久亚洲国产成人精品无码区| 3d动漫精品啪啪一区二区免费| 亚洲精品国产首次亮相| 色噜噜亚洲精品中文字幕| 最新欧洲大片免费在线 | 亚洲av乱码一区二区三区香蕉| 可以免费观看一级毛片黄a| 日韩人妻无码精品久久免费一| 亚洲a∨无码精品色午夜| 国产亚洲免费的视频看| 国产精品免费视频网站| 99热精品在线免费观看| 一级毛片**免费看试看20分钟| 亚洲不卡在线观看| 久久久久亚洲AV片无码| www亚洲一级视频com| 无码区日韩特区永久免费系列 | 两个人看的www视频免费完整版| 亚洲人配人种jizz| 亚洲国产精品一区二区久久hs | 成人毛片手机版免费看| a级毛片免费全部播放无码| 老子影院午夜伦不卡亚洲| 亚洲色图古典武侠| 亚洲国产婷婷六月丁香| 亚洲AV无码不卡在线观看下载| 99久久免费精品国产72精品九九| 嫩草成人永久免费观看| 国产福利在线观看永久免费|