<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

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


    網站導航:
     
    主站蜘蛛池模板: 在线美女免费观看网站h| 中文精品人人永久免费| h视频在线观看免费网站| 亚洲成色WWW久久网站| 暖暖在线视频免费视频| 亚洲国产精品无码久久SM| 久久福利青草精品资源站免费 | 亚洲AV无码成人精品区狼人影院 | yellow免费网站| 伊人婷婷综合缴情亚洲五月| 一个人看的免费观看日本视频www 一个人看的免费视频www在线高清动漫 | 久久精品电影免费动漫| 日韩精品一区二区亚洲AV观看| 亚洲视频在线免费观看| 亚洲高清无在码在线电影不卡| 13一14周岁毛片免费| 亚洲国产激情在线一区| 国产成人精品高清免费| 香港经典a毛片免费观看看| 中文字幕专区在线亚洲| 国产精品99久久免费观看| 亚洲成a人片7777| 青青青青青青久久久免费观看| 免费视频精品一区二区| 亚洲精品自在在线观看| 99无码人妻一区二区三区免费| 亚洲熟妇自偷自拍另欧美| 亚洲国产成人乱码精品女人久久久不卡 | 亚洲一线产区二线产区区| 亚洲国产精品狼友中文久久久| a视频免费在线观看| 亚洲精品欧洲精品| 国产一级做a爱免费视频| 91视频免费网站| 国产精品亚洲四区在线观看| 亚洲国产天堂久久综合| 69视频在线观看高清免费| 国产亚洲美女精品久久久久| 久久亚洲精品国产精品黑人| 成人性生活免费视频| 在线观看黄片免费入口不卡|