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

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

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

    探索與發現

    研究java技術

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      83 隨筆 :: 0 文章 :: 109 評論 :: 0 Trackbacks

    Tiles support


    For better struts/tiles support, myfaces has an integrated JspTilesViewHandler (since release 1.0.6 bate). The main advantage of the ViewHandler is, that tiles-definitions can be sourced out into xml files (up to now using tiles and myfaces you had to definie the layout within jsp-pages).

    Have a look at the tiles-webapp example.

    Steps to implement a myfaces-tiles application:


    1) configure the JspTilesViewHandler in your faces-config:
    <application>
    ???<view-handler>net.sourceforge.myfaces.application.jsp.JspTilesViewHandlerImpl</view-handler>
    </application>

    2) add the following lines to your web.xml
    <context-param>
    ???<param-name>tiles-definitions</param-name>
    ???<param-value>/WEB-INF/tiles.xml</param-value>
    </context-param>

    3) define your layout in a tiles-definition file (sample from the tiles-webapp).

    When rendering the view, the JspTilesViewHandlerImpl will take the given viewId and compute a tileId by
    • substituting any extension by ".tiles"
    • appending ".tiles" if path-mapping is used
    Next the ViewHanlder looks up in the tile-definitions for the corresponding definition.
    (eg. for viewId = /page1.jsp the lookup would be /page1.tiles)

    By the way, the JspTilesViewHandlerImpl is part of the myfaces-components. So someone could use it with Sun's RI too.
    ==================================================================
    <!DOCTYPE tiles-definitions PUBLIC
    ?"-//Apache?Software?Foundation//DTD?Tiles?Configuration//EN"
    ?"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">

    <tiles-definitions>
    ???<definition?name="layout.example"?path="/template/template.jsp"?>
    ???????<put?name="header"?value="/common/header.jsp"?/>
    ???????<put?name="menu"?value="/common/navigation.jsp"?/>
    ???</definition>

    ???<definition?name="/page1.tiles"?extends="layout.example"?>
    ???????<put?name="body"?value="/page1.jsp"?/>
    ???</definition>

    ???<definition?name="/page2.tiles"?extends="layout.example"?>
    ???????<put?name="body"?value="/page2.jsp"?/>
    ???</definition>

    </tiles-definitions>


    http://www.marinschek.com/myfaces/tiki/tiki-index.php?page=Features
    posted on 2006-09-25 05:39 蜘蛛 閱讀(580) 評論(0)  編輯  收藏 所屬分類: jsf

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 在线免费不卡视频| 毛片免费观看网址| 国产亚洲精品无码专区| 日韩a毛片免费观看| 一本色道久久88亚洲综合 | 亚洲人成网站免费播放| 日韩av无码成人无码免费| 国产亚洲国产bv网站在线| 免费一本色道久久一区| 亚洲人成网站999久久久综合| 在线视频免费国产成人| 美女视频黄频a免费| 精品亚洲视频在线观看 | 亚洲毛片免费观看| 182tv免费观看在线视频| 亚洲av永久无码精品天堂久久| 久久久久久久久免费看无码| 亚洲国产av玩弄放荡人妇 | 久9热免费精品视频在线观看| 亚洲AV区无码字幕中文色| 67pao强力打造高清免费| 亚洲精品123区在线观看| www.亚洲精品.com| 日韩免费电影网址| 激情综合亚洲色婷婷五月| 免费人成视网站在线观看不卡| 两性色午夜免费视频| 久久99亚洲网美利坚合众国| 毛片免费在线播放| www.xxxx.com日本免费| 久久亚洲精品国产精品| 永久黄网站色视频免费| A国产一区二区免费入口| 亚洲精品偷拍无码不卡av| 日韩毛片无码永久免费看| 中文字幕在线免费视频| 亚洲二区在线视频| 国产午夜亚洲精品理论片不卡 | 色偷偷亚洲第一综合| 久久亚洲综合色一区二区三区| 国产成人无码免费看视频软件|