第八讲:tapestry组件
生活随笔
收集整理的這篇文章主要介紹了
第八讲:tapestry组件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
tapestry組件有不少,具體的使用方法可去官網了解,常用的組件會在以后的教程中講到。這篇文章主要以pagelink為例,簡單講解下組件通常使用的方法,以下可看出同是跳轉到Index頁面,但寫法就就不是一樣!可選擇其中自己的喜歡的方式寫,所有組件都適用這樣的寫法。代碼如下:
?
AtComponent.java
/** * 項目名稱:TapestryStart * 開發模式:Maven+Tapestry5.x+Tapestry-hibernate+Mysql * 網址: http://www.flywind.org * 版本:1.0 * 編寫:飛風 * 時間:2012-02-29 */ package com.tapestry.app.pages; import org.apache.tapestry5.annotations.Component; import org.apache.tapestry5.corelib.components.PageLink; public class AtComponent { @Component(id="myPage", parameters={"page=Index"}) private PageLink index; }AtComponent.tml
<html t:type="layout" title="tapestryStart Index" ?t:sidebarTitle="Framework Version" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" xmlns:p="tapestry:parameter"> <a t:type="pagelink" t:page="Index" href="#;">index</a><br/> <t:pagelink page="Index">index</t:pagelink><br/> <a t:type="pagelink" t:id="myPage" href="#;">index</a><br/> </html>http://localhost/AtComponent
轉載于:https://my.oschina.net/shootercn/blog/53421
總結
以上是生活随笔為你收集整理的第八讲:tapestry组件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 语言统计学中的几个定律,可作为设计检索的
- 下一篇: 用python的OCR实现自动拍照搜题