ActionLink
描述:
在HTML應答中創建一個超級連接,當連接被觸發時,尋找它的動作監聽器方法,并調用該方法。
參數
名稱 |
類型 |
方向 |
必須 |
默認 |
描述 |
listener |
IActionListener |
in |
yes |
? |
當鏈接被點擊時,代表一個方法 |
disabled |
boolean |
in |
no |
false |
控制鏈接是否可用,如果是true會產生HTML文字響應,相當于直接顯示out |
stateful |
boolean |
in |
no |
true |
如果是ture,組件被出發時需要一個活動的HttpSession,如果沒有會拋出StateLinkException異常。如果是false則沒有必要檢查。必要狀態的附加在URL上。 |
anchor |
String |
in |
no |
? |
錨 相當于產生# |
renderer |
ILinkRender |
in |
no |
? |
要顯示的東西 |
?
DirectLink
描述
創建一個超級鏈接當被觸發時被通報,這個Link包含一些上下文-描述數據來影響組件的監聽器,這是ActionLink不能做到的。
比ActionLink多一個參數
名稱 |
類型 |
方向 |
必須 |
默認 |
描述 |
listener |
? |
? |
? |
? |
? |
parameters |
Object or Object[] or List |
in |
no |
? |
寫入URL中的參數數組,當鏈接被觸發時參數被解釋。
一個建立在Ejb的web應用程序上,上下文經常是一些實體bean的主鍵ID,常見的keys是Strings或者Integers
listener方法可以通過IRequestCycle.getServiceParameters()得到這些附加在URL上參數名稱和值
release 2.2前,參數只允許String類型,現在可以是任何類型,參數在被listener得到后,將保持原來的類型
? |
stateful |
? |
? |
? |
? |
? |
anchor |
? |
? |
? |
? |
? |
renderer |
? |
? |
? |
? |
? |
?
ExternalLink
描述
創建一個超級鏈接到一個IExternalPage
名稱 |
類型 |
方向 |
必須 |
默認 |
描述 |
page |
String |
in |
yes |
? |
The name of a application page to link to. |
parameters |
Object or Object[] or List |
in |
no |
? |
附加到URL中的參數數組,通過IExternalPage.activeExternalPage()
方法被傳遞 |
disable |
? |
? |
? |
? |
? |
anchor |
? |
? |
? |
? |
? |
renderer |
? |
? |
? |
? |
? |
?
GenericLink
描述
創建一個超級鏈接鏈接到任何一個URL
名稱 |
類型 |
方向 |
必須 |
默認 |
描述 |
href |
String |
in |
yes |
? |
The URL to trigger when the link is clicked. This is often of the form:
|
disable |
? |
? |
? |
? |
? |
anchor |
? |
? |
? |
? |
? |
renderer |
? |
? |
? |
? |
? |
?
PageLink
描述
創建一個超級鏈接webApplication中的頁面,Page組件使用PageService構造目的URL。
名稱 |
類型 |
方向 |
必須 |
默認 |
描述 |
page |
String |
in |
yes |
? |
The name of a application page to link to. |
namespace |
INameSpace |
in |
no |
? |
? |
disable |
? |
? |
? |
? |
? |
anchor |
? |
? |
? |
? |
? |
renderer |
? |
? |
? |
? |
? |
?
ServiceLink
描述
創建一個任意的引擎服務鏈接,例如重啟和home服務,經常用來鏈接到影響程序的鏈接
?
名稱 |
類型 |
方向 |
必須 |
默認 |
描述 |
service |
String |
in |
yes |
? |
調用 EngineService 方法的名稱 |
parameters |
Object or Object[] or List |
in |
no |
? |
An array of Objects to be encoded into the URL. These parameters will be decoded when the link is triggered. |
disabled |
boolean |
in |
no |
false |
控制鏈接是否可用,如果是true會產生HTML文字響應,相當于直接顯示out |
context |
Object[] |
in |
no |
? |
Deprecated name for parameters. This will emit warnings in 2.2 and be removed in a later release entirely. |
anchor |
String |
in |
no |
? |
錨 相當于產生# |
renderer |
ILinkRender |
in |
no |
? |
要顯示的東西 |
參考資料http://jakarta.apache.org/tapestry/3.0.3/doc/ComponentReference/?