<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 周銳 閱讀(531) 評論(0)  編輯  收藏 所屬分類: Groovy&Grails
    主站蜘蛛池模板: 亚洲乱码在线观看| 亚洲av乱码一区二区三区香蕉| 免费一级毛片一级毛片aa| 免费成人午夜视频| 亚洲AV网一区二区三区| a级男女仿爱免费视频| 18禁成人网站免费观看| 国产高清免费的视频| 亚洲成A人片在线观看WWW| 亚洲国产成人久久77| 四虎影视在线看免费观看| 免费成人在线视频观看| 日日操夜夜操免费视频| 亚洲精品日韩专区silk | 亚洲精品无码乱码成人| 亚洲成人高清在线观看| 中文字幕乱理片免费完整的| 91成年人免费视频| 亚洲人成网站18禁止一区| 亚洲成在人线电影天堂色| 在线视频观看免费视频18| 久久久亚洲精品视频| 美女裸免费观看网站| 欧美a级在线现免费观看| 久久久久亚洲AV成人无码| 最近中文字幕大全免费视频| 国产自偷亚洲精品页65页| 国产亚洲欧美在线观看| 在线a亚洲v天堂网2019无码| 免费看搞黄视频网站| 亚洲天堂2016| 免费AA片少妇人AA片直播| 亚洲AV日韩AV天堂久久| 免费看美女裸露无档网站| 污网站免费在线观看| 国产精品免费视频一区| 成人性做爰aaa片免费看| 久久亚洲2019中文字幕| 国产AV无码专区亚洲AV琪琪| 成在人线AV无码免费| 33333在线亚洲|