能夠保證有效運(yùn)行的一個(gè)非常重要的原因是,用有狀態(tài)的javabean代替無(wú)狀態(tài)的servlet構(gòu)建一個(gè)tapestry應(yīng)用。page是有狀態(tài)的,他只能在一個(gè)線程里為一個(gè)用戶(hù)處理一個(gè) request,而一個(gè)servelet,沒(méi)有用戶(hù)的狀態(tài),可以在并發(fā)線程中為任何數(shù)量同時(shí)發(fā)生的request提供服務(wù)。使用有狀態(tài)的page遇到的問(wèn)題和使用數(shù)據(jù)庫(kù)的連接遇到的問(wèn)題非常相似 閱讀全文
2007年8月3日 #
能夠保證有效運(yùn)行的一個(gè)非常重要的原因是,用有狀態(tài)的javabean代替無(wú)狀態(tài)的servlet構(gòu)建一個(gè)tapestry應(yīng)用。page是有狀態(tài)的,他只能在一個(gè)線程里為一個(gè)用戶(hù)處理一個(gè) request,而一個(gè)servelet,沒(méi)有用戶(hù)的狀態(tài),可以在并發(fā)線程中為任何數(shù)量同時(shí)發(fā)生的request提供服務(wù)。使用有狀態(tài)的page遇到的問(wèn)題和使用數(shù)據(jù)庫(kù)的連接遇到的問(wèn)題非常相似 閱讀全文
2007年4月16日 #
<img jwcid="@Any" src="images/btn2.gif" onClick="ognl:yourScriptFun"/>
2007年4月11日 #
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是一樣的效果只是實(shí)現(xiàn)的方式不一樣, 一個(gè)是存在cookie或url中另一個(gè)是存在http session中。
client:page session:page 僅在當(dāng)前頁(yè)面有用, 假如轉(zhuǎn)到其他頁(yè)面 這個(gè)屬性值就失效了。
client:app session:app 對(duì)于整個(gè)application都有效, 轉(zhuǎn)到其他頁(yè)面再轉(zhuǎn)回來(lái)的話這個(gè)值仍然存在。如果我們想讓他失效怎么辦呢?你可以調(diào)用這個(gè)方法cycle.forgetPage("YourPageName").
2007年3月30日 #
我們來(lái)看一下最簡(jiǎn)單的TextField組件,組件定義如下 閱讀全文
2007年3月22日 #
2. 持有iframe的頁(yè)面類(lèi)中實(shí)現(xiàn)一個(gè)getIframeRenderer方法: 閱讀全文
2007年1月30日 #
I've added a new screencast, this one showing off the use of the tapestry-simple Maven archetype to create a new project. It runs about five minutes and shows off how simple it is to get up and running.
If you haven't built Tapestry 5 locally, you need to remember to add -DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repository/
to the command line.
I'm thinking about starting a vote to do a preview release of Tapestry 5, just to get the necessary JARs and archetypes into the general Maven repository.
2007年1月29日 #
顯示不友好的URL等,這些都可以使用redirect-after-postpostredirectredirectredirectPagefriendlyUrlurl
要使用這個(gè)模式,不得不提到一個(gè)ILinkT4listener:
閱讀全文