Tapestry

          記錄學(xué)習(xí)Tapestry專用布格格。很多文章都轉(zhuǎn)載網(wǎng)絡(luò)。

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            20 隨筆 :: 0 文章 :: 4 評論 :: 0 Trackbacks

          2007年3月22日 #

               摘要: tapestry的URL形如/examples/app?service=page/Admin
          能夠保證有效運(yùn)行的一個非常重要的原因是,用有狀態(tài)的javabean代替無狀態(tài)的servlet構(gòu)建一個tapestry應(yīng)用。page是有狀態(tài)的,他只能在一個線程里為一個用戶處理一個 request,而一個servelet,沒有用戶的狀態(tài),可以在并發(fā)線程中為任何數(shù)量同時發(fā)生的request提供服務(wù)。使用有狀態(tài)的page遇到的問題和使用數(shù)據(jù)庫的連接遇到的問題非常相似  閱讀全文
          posted @ 2007-08-03 17:39 Tapestry 閱讀(1100) | 評論 (0)編輯 收藏

          http://www.javaeye.com/t/4463.html

          <img jwcid="@Any" src="images/btn2.gif" onClick="ognl:yourScriptFun"/>

          posted @ 2007-04-16 08:41 Tapestry 閱讀(446) | 評論 (0)編輯 收藏

          from http://dengyin2000.javaeye.com/blog/47452


          a) @Persist("client")
          b) @Persist("client:page")
          c) @Persist("client:app")

          a) is the same as b). If you use b) for a property x for page Foo, then
          you can get back the property only if the navigation is Foo => Foo. If the
          navigation is Foo => Bar => Foo, then it will be lost when Bar is
          invoked. In contrast, if you use c), then it will be maintained all
          the way.

          client 跟 session是一樣的效果只是實現(xiàn)的方式不一樣, 一個是存在cookie或url中另一個是存在http session中。

          client:page session:page 僅在當(dāng)前頁面有用, 假如轉(zhuǎn)到其他頁面 這個屬性值就失效了。
          client:app session:app 對于整個application都有效, 轉(zhuǎn)到其他頁面再轉(zhuǎn)回來的話這個值仍然存在。如果我們想讓他失效怎么辦呢?你可以調(diào)用這個方法cycle.forgetPage("YourPageName").
          posted @ 2007-04-11 11:50 Tapestry 閱讀(518) | 評論 (0)編輯 收藏

               摘要: All interactive programs provide two basic functions: obtaining user input and displaying the results. Web applications implement this behavior using two HTTP methods: POST and GET respectively. This simple protocol gets broken when application returns web page in response to POST request. Peculiarities of POST method combined with idiosyncrasies of different browsers often lead to unpleasant user experience and may produce incorrect state of server application. This article shows how to design   閱讀全文
          posted @ 2007-03-30 23:03 Tapestry 閱讀(1640) | 評論 (0)編輯 收藏

               摘要: http://ralf-realman.javaeye.com/blog/post/144266  閱讀全文
          posted @ 2007-03-30 22:43 Tapestry 閱讀(728) | 評論 (0)編輯 收藏

               摘要: Tapestry的rewind一直是學(xué)習(xí)和使用Tapestry的難點(diǎn),rewind是用來處理表單提交的,表單默認(rèn)使用的是 DirectService來提交。在詳細(xì)介紹之前,先說明下此文中需要用到的一些概念,首先是表單組件,我這里指的是指繼承自 AbstractFormComponent類的組件,例如:TextField、TextArea、Checkbox等,而不是具體的Form組件,表單組件使用時必須在Form組件中,這些組件在rewind時調(diào)用繼承自AbstractFormComponent的 rewindFormComponent來讀取數(shù)據(jù),并將數(shù)據(jù)賦值給容器或者頁面。
          我們來看一下最簡單的TextField組件,組件定義如下   閱讀全文
          posted @ 2007-03-30 22:32 Tapestry 閱讀(473) | 評論 (0)編輯 收藏

               摘要: 1. iframe所引用的頁面類實現(xiàn)IExternalPage接口和activateExternalPage方法

          2. 持有iframe的頁面類中實現(xiàn)一個getIframeRenderer方法:  閱讀全文
          posted @ 2007-03-22 19:05 Tapestry 閱讀(598) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 达日县| 紫金县| 双流县| 和静县| 修武县| 峡江县| 麦盖提县| 阿拉善左旗| 温泉县| 松阳县| 信丰县| 宜丰县| 昌图县| 铜山县| 榆树市| 浦江县| 安溪县| 平陆县| 大厂| 祁东县| 伊春市| 绥阳县| 仁怀市| 白城市| 金沙县| 黄骅市| 武定县| 平泉县| 临沧市| 屯昌县| 新巴尔虎左旗| 织金县| 凤阳县| 永德县| 鄂温| 信丰县| 新安县| 华亭县| 五常市| 灌南县| 平邑县|