Cubby tags
Tag link


アクションクラス名、アクションメソッド名から URL を出力します。

ボディ部に t:param タグ置くことで、URL 埋め込みのパラメータやクエリ文字列のパラメータを指定することができます。


Example:
[1] URL をそのまま出力 (JSP) <t:link actionClass="com.example.action.FooAction" actionMethod="bar" /> (実行結果) /(contextPath)/foo/bar [2] URL を a タグに出力 (JSP) <t:link actionClass="com.example.action.FooAction" actionMethod="bar" tag="a" attr="href"> link to action </t:link> (実行結果) <a href="/(contextPath)/foo/bar"> link to action </a> [3] パラメータ指定 (アクションメソッドに @Path("baz/{id}") という指定があった場合) (JSP) <t:link actionClass="com.example.action.FooAction" actionMethod="bar" tag="a" attr="href"> <t:param name="id" value="123" /> <t:param name="token" value="abc" /> link to action </t:link> (実行結果) <a href="/(contextPath)/foo/baz/123&token=abc"> link to action </a>


Tag Information
Tag Classorg.seasar.cubby.tags.LinkTag
TagExtraInfo ClassNone
Body Contentscriptless
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
tagfalsetruejava.lang.StringURL を a や img など、指定された HTML タグの属性として出力します。

この属性を指定したときは、必ず attribute 属性も指定してください。

attrfalsetruejava.lang.Classtag 属性が指定された時に、a なら href、img なら src など、タグのどの属性に URL を出力するかを指定します。

tag 属性を指定したときは必ず指定してください。

actionClasstruetruejava.lang.StringFQCN 形式でアクションクラスを指定します。
actionMethodtruetruejava.lang.Stringアクションメソッドを指定します。
encodeURLfalsetruejava.lang.Boolean出力する URL を HttpServletResponse#encodeURL(String) でエンコードするかを指定します。デフォルトは true です。

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.