<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0_02) on Mon Nov 26 08:08:47 PST 2007 --> | |
<TITLE> | |
LinkTool (VelocityTools 1.4 Documentation) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.velocity.tools.view.tools.LinkTool class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="LinkTool (VelocityTools 1.4 Documentation)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/ImportTool.html" title="class in org.apache.velocity.tools.view.tools"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.QueryPair.html" title="class in org.apache.velocity.tools.view.tools"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/LinkTool.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="LinkTool.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.velocity.tools.view.tools</FONT> | |
<BR> | |
Class LinkTool</H2> | |
<PRE> | |
java.lang.Object | |
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.velocity.tools.view.tools.LinkTool</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable</DD> | |
</DL> | |
<DL> | |
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../../org/apache/velocity/tools/struts/SecureLinkTool.html" title="class in org.apache.velocity.tools.struts">SecureLinkTool</A>, <A HREF="../../../../../../org/apache/velocity/tools/struts/StrutsLinkTool.html" title="class in org.apache.velocity.tools.struts">StrutsLinkTool</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>LinkTool</B><DT>extends java.lang.Object<DT>implements java.lang.Cloneable</DL> | |
</PRE> | |
<P> | |
View tool to make building URIs pleasant and fun! | |
<p><pre> | |
Template example(s): | |
#set( $base = $link.relative('MyPage.vm').anchor('view') ) | |
<a href="$base.param('select','this')">this</a> | |
<a href="$base.param('select','that')">that</a> | |
Toolbox configuration: | |
<tool> | |
<key>link</key> | |
<scope>request</scope> | |
<class>org.apache.velocity.tools.view.tools.LinkTool</class> | |
</tool> | |
</pre></p> | |
<p>This tool should only be used in the request scope.</p> | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.0</DD> | |
<DT><B>Version:</B></DT> | |
<DD>$Id: LinkTool.java 595062 2007-11-14 21:18:55Z nbubna $</DD> | |
<DT><B>Author:</B></DT> | |
<DD><a href="mailto:sidler@teamup.com">Gabe Sidler</a>, Nathan Bubna, Chris Schultz</DD> | |
</DL> | |
<HR> | |
<P> | |
<!-- ======== NESTED CLASS SUMMARY ======== --> | |
<A NAME="nested_class_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Nested Class Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected class</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.QueryPair.html" title="class in org.apache.velocity.tools.view.tools">LinkTool.QueryPair</A></B></CODE> | |
<BR> | |
Internal util class to handle representation and | |
encoding of key/value pairs in the query string</TD> | |
</TR> | |
</TABLE> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<A NAME="field_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Field Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#anchor">anchor</A></B></CODE> | |
<BR> | |
The anchor set for this link.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected javax.servlet.ServletContext</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#application">application</A></B></CODE> | |
<BR> | |
A reference to the ServletContext</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#AUTO_IGNORE_PARAMETERS_KEY">AUTO_IGNORE_PARAMETERS_KEY</A></B></CODE> | |
<BR> | |
Parameter key for configuring <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAutoIgnoreParameters(boolean)"><CODE>setAutoIgnoreParameters(boolean)</CODE></A> state.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#autoIgnore">autoIgnore</A></B></CODE> | |
<BR> | |
<code>true</code> if parameters explicitly set on this LinkTool | |
should be added to the ignore list.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private static java.lang.reflect.Method</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#encode">encode</A></B></CODE> | |
<BR> | |
Java 1.4 encode method to use instead of deprecated 1.3 version.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#HTML_QUERY_DELIMITER">HTML_QUERY_DELIMITER</A></B></CODE> | |
<BR> | |
Standard HTML delimiter for query data ('&')</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected static org.apache.commons.logging.Log</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#LOG">LOG</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private java.util.HashSet</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#parametersToIgnore">parametersToIgnore</A></B></CODE> | |
<BR> | |
List of parameters that should be ignored when the current request's | |
parameters are copied.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private java.util.ArrayList</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#queryData">queryData</A></B></CODE> | |
<BR> | |
A list of query string parameters.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#queryDataDelim">queryDataDelim</A></B></CODE> | |
<BR> | |
The current delimiter for query data</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected javax.servlet.http.HttpServletRequest</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#request">request</A></B></CODE> | |
<BR> | |
A reference to the HttpServletRequest.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected javax.servlet.http.HttpServletResponse</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#response">response</A></B></CODE> | |
<BR> | |
A reference to the HttpServletResponse.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#SELF_ABSOLUTE_KEY">SELF_ABSOLUTE_KEY</A></B></CODE> | |
<BR> | |
Parameter key for configuring <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfAbsolute(boolean)"><CODE>setSelfAbsolute(boolean)</CODE></A> state</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#SELF_INCLUDE_PARAMETERS_KEY">SELF_INCLUDE_PARAMETERS_KEY</A></B></CODE> | |
<BR> | |
Parameter key for configuring <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfIncludeParameters(boolean)"><CODE>setSelfIncludeParameters(boolean)</CODE></A> state</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#selfAbsolute">selfAbsolute</A></B></CODE> | |
<BR> | |
The self-absolute status</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#selfParams">selfParams</A></B></CODE> | |
<BR> | |
The self-include-parameters status</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#uri">uri</A></B></CODE> | |
<BR> | |
The URI reference set for this link.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#XHTML_QUERY_DELIMITER">XHTML_QUERY_DELIMITER</A></B></CODE> | |
<BR> | |
XHTML delimiter for query data ('&amp;')</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#LinkTool()">LinkTool</A></B>()</CODE> | |
<BR> | |
Default constructor.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#absolute(java.lang.String)">absolute</A></B>(java.lang.String uri)</CODE> | |
<BR> | |
Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAbsolute(java.lang.String)"><CODE>setAbsolute(java.lang.String)</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()">addAllParameters</A></B>()</CODE> | |
<BR> | |
Adds all of the current request's parameters to this link's | |
"query data".</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addIgnore(java.lang.String)">addIgnore</A></B>(java.lang.String parameterName)</CODE> | |
<BR> | |
Instructs this LinkTool to ignore the specified parameter when | |
copying the current request's parameters.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.util.Map)">addQueryData</A></B>(java.util.Map parameters)</CODE> | |
<BR> | |
Adds multiple key=value pairs to the query data.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.lang.String, java.lang.Object)">addQueryData</A></B>(java.lang.String key, | |
java.lang.Object value)</CODE> | |
<BR> | |
Adds a key=value pair to the query data.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#anchor(java.lang.String)">anchor</A></B>(java.lang.String anchor)</CODE> | |
<BR> | |
Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAnchor(java.lang.String)"><CODE>setAnchor(java.lang.String)</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#configure(java.util.Map)">configure</A></B>(java.util.Map params)</CODE> | |
<BR> | |
Configures this tool</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#copyWith(org.apache.velocity.tools.view.tools.LinkTool.QueryPair)">copyWith</A></B>(<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.QueryPair.html" title="class in org.apache.velocity.tools.view.tools">LinkTool.QueryPair</A> pair)</CODE> | |
<BR> | |
For internal use.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#copyWith(java.util.Map)">copyWith</A></B>(java.util.Map newQueryData)</CODE> | |
<BR> | |
For internal use.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#copyWith(java.lang.String)">copyWith</A></B>(java.lang.String uri)</CODE> | |
<BR> | |
For internal use.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#copyWithAnchor(java.lang.String)">copyWithAnchor</A></B>(java.lang.String anchor)</CODE> | |
<BR> | |
For internal use.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#copyWithIgnore(java.lang.String)">copyWithIgnore</A></B>(java.lang.String parameterName)</CODE> | |
<BR> | |
For internal use.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#duplicate()">duplicate</A></B>()</CODE> | |
<BR> | |
This is just to avoid duplicating this code for both copyWith() methods</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#encodeURL(java.lang.String)">encodeURL</A></B>(java.lang.String url)</CODE> | |
<BR> | |
Use the new URLEncoder.encode() method from java 1.4 if available, else | |
use the old deprecated version.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getAnchor()">getAnchor</A></B>()</CODE> | |
<BR> | |
Returns the anchor (internal document reference) set for this link.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getBaseRef()">getBaseRef</A></B>()</CODE> | |
<BR> | |
Returns the full URI of this template without any query data.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getContextPath()">getContextPath</A></B>()</CODE> | |
<BR> | |
Returns the context path that addresses this web | |
application, e.g.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getContextURL()">getContextURL</A></B>()</CODE> | |
<BR> | |
Returns the URI that addresses this web application.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getParams()">getParams</A></B>()</CODE> | |
<BR> | |
Convenience method equivalent to | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getQueryData()"><CODE>getQueryData()</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getQueryData()">getQueryData</A></B>()</CODE> | |
<BR> | |
Returns this link's query data as a url-encoded string e.g.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getRequestPath()">getRequestPath</A></B>()</CODE> | |
<BR> | |
Retrieves the path for the current request regardless of | |
whether this is a direct request or an include by the | |
RequestDispatcher.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()">getSelf</A></B>()</CODE> | |
<BR> | |
This method returns a new "self-referencing" LinkTool for the current | |
request.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getUri()">getUri</A></B>()</CODE> | |
<BR> | |
Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getURI()"><CODE>getURI()</CODE></A> to enable | |
all lowercase <code>$link.uri</code> syntax.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getURI()">getURI</A></B>()</CODE> | |
<BR> | |
Returns the current URI of this link as set by the setURI(String), | |
setAbsolute(String) or setRelative(String) methods.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#init(java.lang.Object)">init</A></B>(java.lang.Object obj)</CODE> | |
<BR> | |
Initializes this tool.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#param(java.lang.Object, java.lang.Object)">param</A></B>(java.lang.Object key, | |
java.lang.Object value)</CODE> | |
<BR> | |
Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.lang.String, java.lang.Object)"><CODE>addQueryData(java.lang.String, java.lang.Object)</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#params(java.util.Map)">params</A></B>(java.util.Map parameters)</CODE> | |
<BR> | |
Convenience method equivalent to | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.util.Map)"><CODE>addQueryData(Map parameters)</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#relative(java.lang.String)">relative</A></B>(java.lang.String uri)</CODE> | |
<BR> | |
Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setRelative(java.lang.String)"><CODE>setRelative(java.lang.String)</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAbsolute(java.lang.String)">setAbsolute</A></B>(java.lang.String uri)</CODE> | |
<BR> | |
Returns a copy of the link with the specified URI reference | |
either used as or converted to an absolute (non-relative) | |
URI reference.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAnchor(java.lang.String)">setAnchor</A></B>(java.lang.String anchor)</CODE> | |
<BR> | |
Returns a copy of the link with the specified anchor to be | |
added to the end of the generated hyperlink.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAutoIgnoreParameters(boolean)">setAutoIgnoreParameters</A></B>(boolean autoIgnore)</CODE> | |
<BR> | |
Controls whether or not the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.lang.String, java.lang.Object)"><CODE>addQueryData(String,Object)</CODE></A> | |
and <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.util.Map)"><CODE>addQueryData(Map)</CODE></A> methods will | |
automatically add the specified parameter(s) to the ignore list | |
for <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setRelative(java.lang.String)">setRelative</A></B>(java.lang.String uri)</CODE> | |
<BR> | |
Returns a copy of the link with the specified context-relative | |
URI reference converted to a server-relative URI reference.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfAbsolute(boolean)">setSelfAbsolute</A></B>(boolean selfAbsolute)</CODE> | |
<BR> | |
Controls whether or not the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A> method will return | |
a duplicate with a URI in absolute or relative form.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfIncludeParameters(boolean)">setSelfIncludeParameters</A></B>(boolean selfParams)</CODE> | |
<BR> | |
Controls whether or not the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A> method will return | |
a duplicate that includes current request parameters.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setURI(java.lang.String)">setURI</A></B>(java.lang.String uri)</CODE> | |
<BR> | |
Returns a copy of the link with the given URI reference set.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setXhtml(boolean)">setXhtml</A></B>(boolean useXhtml)</CODE> | |
<BR> | |
Controls the delimiter used for separating query data pairs.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> java.lang.String</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#toString()">toString</A></B>()</CODE> | |
<BR> | |
Returns the full URI reference that's been built with this tool, | |
including the query string and anchor, e.g.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#uri(java.lang.String)">uri</A></B>(java.lang.String uri)</CODE> | |
<BR> | |
Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setURI(java.lang.String)"><CODE>setURI(java.lang.String)</CODE></A>.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ FIELD DETAIL =========== --> | |
<A NAME="field_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Field Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="LOG"><!-- --></A><H3> | |
LOG</H3> | |
<PRE> | |
protected static final org.apache.commons.logging.Log <B>LOG</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="SELF_ABSOLUTE_KEY"><!-- --></A><H3> | |
SELF_ABSOLUTE_KEY</H3> | |
<PRE> | |
public static final java.lang.String <B>SELF_ABSOLUTE_KEY</B></PRE> | |
<DL> | |
<DD>Parameter key for configuring <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfAbsolute(boolean)"><CODE>setSelfAbsolute(boolean)</CODE></A> state | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.LinkTool.SELF_ABSOLUTE_KEY">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="SELF_INCLUDE_PARAMETERS_KEY"><!-- --></A><H3> | |
SELF_INCLUDE_PARAMETERS_KEY</H3> | |
<PRE> | |
public static final java.lang.String <B>SELF_INCLUDE_PARAMETERS_KEY</B></PRE> | |
<DL> | |
<DD>Parameter key for configuring <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfIncludeParameters(boolean)"><CODE>setSelfIncludeParameters(boolean)</CODE></A> state | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.LinkTool.SELF_INCLUDE_PARAMETERS_KEY">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="AUTO_IGNORE_PARAMETERS_KEY"><!-- --></A><H3> | |
AUTO_IGNORE_PARAMETERS_KEY</H3> | |
<PRE> | |
public static final java.lang.String <B>AUTO_IGNORE_PARAMETERS_KEY</B></PRE> | |
<DL> | |
<DD>Parameter key for configuring <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAutoIgnoreParameters(boolean)"><CODE>setAutoIgnoreParameters(boolean)</CODE></A> state. | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.4</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.LinkTool.AUTO_IGNORE_PARAMETERS_KEY">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="HTML_QUERY_DELIMITER"><!-- --></A><H3> | |
HTML_QUERY_DELIMITER</H3> | |
<PRE> | |
public static final java.lang.String <B>HTML_QUERY_DELIMITER</B></PRE> | |
<DL> | |
<DD>Standard HTML delimiter for query data ('&') | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.LinkTool.HTML_QUERY_DELIMITER">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="XHTML_QUERY_DELIMITER"><!-- --></A><H3> | |
XHTML_QUERY_DELIMITER</H3> | |
<PRE> | |
public static final java.lang.String <B>XHTML_QUERY_DELIMITER</B></PRE> | |
<DL> | |
<DD>XHTML delimiter for query data ('&amp;') | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../constant-values.html#org.apache.velocity.tools.view.tools.LinkTool.XHTML_QUERY_DELIMITER">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="application"><!-- --></A><H3> | |
application</H3> | |
<PRE> | |
protected javax.servlet.ServletContext <B>application</B></PRE> | |
<DL> | |
<DD>A reference to the ServletContext | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="request"><!-- --></A><H3> | |
request</H3> | |
<PRE> | |
protected javax.servlet.http.HttpServletRequest <B>request</B></PRE> | |
<DL> | |
<DD>A reference to the HttpServletRequest. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="response"><!-- --></A><H3> | |
response</H3> | |
<PRE> | |
protected javax.servlet.http.HttpServletResponse <B>response</B></PRE> | |
<DL> | |
<DD>A reference to the HttpServletResponse. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="uri"><!-- --></A><H3> | |
uri</H3> | |
<PRE> | |
private java.lang.String <B>uri</B></PRE> | |
<DL> | |
<DD>The URI reference set for this link. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="anchor"><!-- --></A><H3> | |
anchor</H3> | |
<PRE> | |
private java.lang.String <B>anchor</B></PRE> | |
<DL> | |
<DD>The anchor set for this link. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="queryData"><!-- --></A><H3> | |
queryData</H3> | |
<PRE> | |
private java.util.ArrayList <B>queryData</B></PRE> | |
<DL> | |
<DD>A list of query string parameters. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="queryDataDelim"><!-- --></A><H3> | |
queryDataDelim</H3> | |
<PRE> | |
private java.lang.String <B>queryDataDelim</B></PRE> | |
<DL> | |
<DD>The current delimiter for query data | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="selfAbsolute"><!-- --></A><H3> | |
selfAbsolute</H3> | |
<PRE> | |
private boolean <B>selfAbsolute</B></PRE> | |
<DL> | |
<DD>The self-absolute status | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="selfParams"><!-- --></A><H3> | |
selfParams</H3> | |
<PRE> | |
private boolean <B>selfParams</B></PRE> | |
<DL> | |
<DD>The self-include-parameters status | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="parametersToIgnore"><!-- --></A><H3> | |
parametersToIgnore</H3> | |
<PRE> | |
private java.util.HashSet <B>parametersToIgnore</B></PRE> | |
<DL> | |
<DD>List of parameters that should be ignored when the current request's | |
parameters are copied. | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addIgnore(java.lang.String)"><CODE>addIgnore(String)</CODE></A>, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A></DL> | |
</DL> | |
<HR> | |
<A NAME="autoIgnore"><!-- --></A><H3> | |
autoIgnore</H3> | |
<PRE> | |
private boolean <B>autoIgnore</B></PRE> | |
<DL> | |
<DD><code>true</code> if parameters explicitly set on this LinkTool | |
should be added to the ignore list. | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#parametersToIgnore"><CODE>parametersToIgnore</CODE></A></DL> | |
</DL> | |
<HR> | |
<A NAME="encode"><!-- --></A><H3> | |
encode</H3> | |
<PRE> | |
private static java.lang.reflect.Method <B>encode</B></PRE> | |
<DL> | |
<DD>Java 1.4 encode method to use instead of deprecated 1.3 version. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="LinkTool()"><!-- --></A><H3> | |
LinkTool</H3> | |
<PRE> | |
public <B>LinkTool</B>()</PRE> | |
<DL> | |
<DD>Default constructor. Tool must be initialized before use. | |
<P> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="setXhtml(boolean)"><!-- --></A><H3> | |
setXhtml</H3> | |
<PRE> | |
protected void <B>setXhtml</B>(boolean useXhtml)</PRE> | |
<DL> | |
<DD><p>Controls the delimiter used for separating query data pairs. | |
By default, the standard '&' character is used.</p> | |
<p>This is not exposed to templates as this decision is best not | |
made at that level.</p> | |
<p>Subclasses may easily override the init() method to set this | |
appropriately and then call super.init()</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>useXhtml</CODE> - if true, the XHTML query data delimiter ('&amp;') | |
will be used. if false, then '&' will be used.<DT><B>See Also:</B><DD><a href="http://www.w3.org/TR/xhtml1/#C_12">Using Ampersands in Attribute Values (and Elsewhere)</a></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSelfAbsolute(boolean)"><!-- --></A><H3> | |
setSelfAbsolute</H3> | |
<PRE> | |
protected void <B>setSelfAbsolute</B>(boolean selfAbsolute)</PRE> | |
<DL> | |
<DD><p>Controls whether or not the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A> method will return | |
a duplicate with a URI in absolute or relative form.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>selfAbsolute</CODE> - if true, the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A> method will return | |
a duplicate of this tool with an absolute self-referencing URI; | |
if false, a duplicate with a relative self-referencing URI will | |
be returned<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSelfIncludeParameters(boolean)"><!-- --></A><H3> | |
setSelfIncludeParameters</H3> | |
<PRE> | |
protected void <B>setSelfIncludeParameters</B>(boolean selfParams)</PRE> | |
<DL> | |
<DD><p>Controls whether or not the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A> method will return | |
a duplicate that includes current request parameters.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>selfParams</CODE> - if true, the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A> method will return | |
a duplicate of this tool that includes current request parameters<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getSelf()"><CODE>getSelf()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setAutoIgnoreParameters(boolean)"><!-- --></A><H3> | |
setAutoIgnoreParameters</H3> | |
<PRE> | |
protected void <B>setAutoIgnoreParameters</B>(boolean autoIgnore)</PRE> | |
<DL> | |
<DD><p>Controls whether or not the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.lang.String, java.lang.Object)"><CODE>addQueryData(String,Object)</CODE></A> | |
and <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.util.Map)"><CODE>addQueryData(Map)</CODE></A> methods will | |
automatically add the specified parameter(s) to the ignore list | |
for <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A></p> | |
<p>The default for this setting is <code>true</code>.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>autoIgnore</CODE> - if true, the <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.lang.String, java.lang.Object)"><CODE>addQueryData(String,Object)</CODE></A> | |
and <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.util.Map)"><CODE>addQueryData(Map)</CODE></A> methods will | |
automatically add the specified parameter(s) to the ignore list | |
for <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A>; otherwise, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addIgnore(java.lang.String)"><CODE>addIgnore(String)</CODE></A> must be called explicitly for each | |
parameter to ignore.</p><DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.4</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addIgnore(java.lang.String)"><CODE>addIgnore(String)</CODE></A>, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="copyWith(org.apache.velocity.tools.view.tools.LinkTool.QueryPair)"><!-- --></A><H3> | |
copyWith</H3> | |
<PRE> | |
protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>copyWith</B>(<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.QueryPair.html" title="class in org.apache.velocity.tools.view.tools">LinkTool.QueryPair</A> pair)</PRE> | |
<DL> | |
<DD>For internal use. | |
Copies 'that' LinkTool into this one and adds the new query data. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>pair</CODE> - the query parameter to add</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="copyWith(java.util.Map)"><!-- --></A><H3> | |
copyWith</H3> | |
<PRE> | |
protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>copyWith</B>(java.util.Map newQueryData)</PRE> | |
<DL> | |
<DD>For internal use. | |
Copies 'that' LinkTool into this one and adds the new query data. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>newQueryData</CODE> - the query parameters to add<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="copyWith(java.lang.String)"><!-- --></A><H3> | |
copyWith</H3> | |
<PRE> | |
protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>copyWith</B>(java.lang.String uri)</PRE> | |
<DL> | |
<DD>For internal use. | |
Copies 'that' LinkTool into this one and sets the new URI. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - uri string</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="copyWithAnchor(java.lang.String)"><!-- --></A><H3> | |
copyWithAnchor</H3> | |
<PRE> | |
protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>copyWithAnchor</B>(java.lang.String anchor)</PRE> | |
<DL> | |
<DD>For internal use. | |
Copies 'that' LinkTool into this one and sets the new | |
anchor for the link. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>anchor</CODE> - URI string</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="copyWithIgnore(java.lang.String)"><!-- --></A><H3> | |
copyWithIgnore</H3> | |
<PRE> | |
protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>copyWithIgnore</B>(java.lang.String parameterName)</PRE> | |
<DL> | |
<DD>For internal use. | |
Copies this LinkTool and adds the specified parameter name to the | |
ignore list in the copy. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>parameterName</CODE> - The name of the parameter to ignore when | |
copying all parameters from the current request. | |
<DT><B>Returns:</B><DD>A new LinkTool with the specified parameterName added to the | |
ignore list.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A>, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addIgnore(java.lang.String)"><CODE>addIgnore(String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="duplicate()"><!-- --></A><H3> | |
duplicate</H3> | |
<PRE> | |
protected <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>duplicate</B>()</PRE> | |
<DL> | |
<DD>This is just to avoid duplicating this code for both copyWith() methods | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="configure(java.util.Map)"><!-- --></A><H3> | |
configure</H3> | |
<PRE> | |
public void <B>configure</B>(java.util.Map params)</PRE> | |
<DL> | |
<DD>Configures this tool | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>params</CODE> - Map of configuration parameters<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="init(java.lang.Object)"><!-- --></A><H3> | |
init</H3> | |
<PRE> | |
public void <B>init</B>(java.lang.Object obj)</PRE> | |
<DL> | |
<DD>Initializes this tool. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the current ViewContext | |
<DT><B>Throws:</B> | |
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the param is not a ViewContext</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setAnchor(java.lang.String)"><!-- --></A><H3> | |
setAnchor</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>setAnchor</B>(java.lang.String anchor)</PRE> | |
<DL> | |
<DD><p>Returns a copy of the link with the specified anchor to be | |
added to the end of the generated hyperlink.</p> | |
Example:<br> | |
<code><a href='$link.setAnchor("foo")'>Foo</a></code><br> | |
produces something like</br> | |
<code><a href="#foo">Foo</a></code><br> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>anchor</CODE> - an internal document reference | |
<DT><B>Returns:</B><DD>a new instance of LinkTool with the set anchor</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="anchor(java.lang.String)"><!-- --></A><H3> | |
anchor</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>anchor</B>(java.lang.String anchor)</PRE> | |
<DL> | |
<DD>Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAnchor(java.lang.String)"><CODE>setAnchor(java.lang.String)</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getAnchor()"><!-- --></A><H3> | |
getAnchor</H3> | |
<PRE> | |
public java.lang.String <B>getAnchor</B>()</PRE> | |
<DL> | |
<DD>Returns the anchor (internal document reference) set for this link. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRelative(java.lang.String)"><!-- --></A><H3> | |
setRelative</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>setRelative</B>(java.lang.String uri)</PRE> | |
<DL> | |
<DD><p>Returns a copy of the link with the specified context-relative | |
URI reference converted to a server-relative URI reference. This | |
method will overwrite any previous URI reference settings but will | |
copy the query string.</p> | |
Example:<br> | |
<code><a href='$link.setRelative("/templates/login/index.vm")'>Login Page</a></code><br> | |
produces something like</br> | |
<code><a href="/myapp/templates/login/index.vm">Login Page</a></code><br> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - A context-relative URI reference. A context-relative URI | |
is a URI that is relative to the root of this web application. | |
<DT><B>Returns:</B><DD>a new instance of LinkTool with the specified URI</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="relative(java.lang.String)"><!-- --></A><H3> | |
relative</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>relative</B>(java.lang.String uri)</PRE> | |
<DL> | |
<DD>Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setRelative(java.lang.String)"><CODE>setRelative(java.lang.String)</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setAbsolute(java.lang.String)"><!-- --></A><H3> | |
setAbsolute</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>setAbsolute</B>(java.lang.String uri)</PRE> | |
<DL> | |
<DD><p>Returns a copy of the link with the specified URI reference | |
either used as or converted to an absolute (non-relative) | |
URI reference. This method will overwrite any previous URI | |
reference settings but will copy the query string.</p> | |
Example:<br> | |
<code><a href='$link.setAbsolute("/templates/login/index.vm")'>Login Page</a></code><br> | |
produces something like<br/> | |
<code><a href="http://myserver.net/myapp/templates/login/index.vm">Login Page</a></code><br> | |
and<br> | |
<code><a href='$link.setAbsolute("http://theirserver.com/index.jsp")'>Their, Inc.</a></code><br> | |
produces something like<br/> | |
<code><a href="http://theirserver.net/index.jsp">Their, Inc.</a></code><br> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - A context-relative URI reference or absolute URL. | |
<DT><B>Returns:</B><DD>a new instance of LinkTool with the specified URI<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="absolute(java.lang.String)"><!-- --></A><H3> | |
absolute</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>absolute</B>(java.lang.String uri)</PRE> | |
<DL> | |
<DD>Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setAbsolute(java.lang.String)"><CODE>setAbsolute(java.lang.String)</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setURI(java.lang.String)"><!-- --></A><H3> | |
setURI</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>setURI</B>(java.lang.String uri)</PRE> | |
<DL> | |
<DD><p>Returns a copy of the link with the given URI reference set. | |
No conversions are applied to the given URI reference. The URI | |
reference can be absolute, server-relative, relative and may | |
contain query parameters. This method will overwrite any | |
previous URI reference settings but will copy the query | |
string.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>uri</CODE> - URI reference to set | |
<DT><B>Returns:</B><DD>a new instance of LinkTool</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="uri(java.lang.String)"><!-- --></A><H3> | |
uri</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>uri</B>(java.lang.String uri)</PRE> | |
<DL> | |
<DD>Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setURI(java.lang.String)"><CODE>setURI(java.lang.String)</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getURI()"><!-- --></A><H3> | |
getURI</H3> | |
<PRE> | |
public java.lang.String <B>getURI</B>()</PRE> | |
<DL> | |
<DD><p>Returns the current URI of this link as set by the setURI(String), | |
setAbsolute(String) or setRelative(String) methods. Any conversions | |
have been applied. The returned URI reference does not include query | |
data that was added with method addQueryData().</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getUri()"><!-- --></A><H3> | |
getUri</H3> | |
<PRE> | |
public java.lang.String <B>getUri</B>()</PRE> | |
<DL> | |
<DD>Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getURI()"><CODE>getURI()</CODE></A> to enable | |
all lowercase <code>$link.uri</code> syntax. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addQueryData(java.lang.String, java.lang.Object)"><!-- --></A><H3> | |
addQueryData</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>addQueryData</B>(java.lang.String key, | |
java.lang.Object value)</PRE> | |
<DL> | |
<DD><p>Adds a key=value pair to the query data. This returns a new LinkTool | |
containing both a copy of this LinkTool's query data and the new data. | |
Query data is URL encoded before it is appended.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>key</CODE> - key of new query parameter<DD><CODE>value</CODE> - value of new query parameter | |
<DT><B>Returns:</B><DD>a new instance of LinkTool</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addQueryData(java.util.Map)"><!-- --></A><H3> | |
addQueryData</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>addQueryData</B>(java.util.Map parameters)</PRE> | |
<DL> | |
<DD><p>Adds multiple key=value pairs to the query data. | |
This returns a new LinkTool containing both a copy of | |
this LinkTool's query data and the new data. | |
Query data is URL encoded before it is appended.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>parameters</CODE> - map of new query data keys to values | |
<DT><B>Returns:</B><DD>a new instance of LinkTool<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="param(java.lang.Object, java.lang.Object)"><!-- --></A><H3> | |
param</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>param</B>(java.lang.Object key, | |
java.lang.Object value)</PRE> | |
<DL> | |
<DD>Convenience method equivalent to <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.lang.String, java.lang.Object)"><CODE>addQueryData(java.lang.String, java.lang.Object)</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="params(java.util.Map)"><!-- --></A><H3> | |
params</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>params</B>(java.util.Map parameters)</PRE> | |
<DL> | |
<DD>Convenience method equivalent to | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addQueryData(java.util.Map)"><CODE>addQueryData(Map parameters)</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getQueryData()"><!-- --></A><H3> | |
getQueryData</H3> | |
<PRE> | |
public java.lang.String <B>getQueryData</B>()</PRE> | |
<DL> | |
<DD><p>Returns this link's query data as a url-encoded string e.g. | |
<code>key=value&foo=this+is+encoded</code>.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getParams()"><!-- --></A><H3> | |
getParams</H3> | |
<PRE> | |
public java.lang.String <B>getParams</B>()</PRE> | |
<DL> | |
<DD>Convenience method equivalent to | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getQueryData()"><CODE>getQueryData()</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getContextURL()"><!-- --></A><H3> | |
getContextURL</H3> | |
<PRE> | |
public java.lang.String <B>getContextURL</B>()</PRE> | |
<DL> | |
<DD><p>Returns the URI that addresses this web application. E.g. | |
<code>http://myserver.net/myapp</code>. This string does not end | |
with a "/". Note! This will not represent any URI reference or | |
query data set for this LinkTool.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getContextPath()"><!-- --></A><H3> | |
getContextPath</H3> | |
<PRE> | |
public java.lang.String <B>getContextPath</B>()</PRE> | |
<DL> | |
<DD><p>Returns the context path that addresses this web | |
application, e.g. <code>/myapp</code>. This string starts | |
with a "/" but does not end with a "/" Note! This will not | |
represent any URI reference or query data set for this | |
LinkTool.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRequestPath()"><!-- --></A><H3> | |
getRequestPath</H3> | |
<PRE> | |
public java.lang.String <B>getRequestPath</B>()</PRE> | |
<DL> | |
<DD><p>Retrieves the path for the current request regardless of | |
whether this is a direct request or an include by the | |
RequestDispatcher. Note! This will not | |
represent any URI reference or query data set for this | |
LinkTool.</p> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getBaseRef()"><!-- --></A><H3> | |
getBaseRef</H3> | |
<PRE> | |
public java.lang.String <B>getBaseRef</B>()</PRE> | |
<DL> | |
<DD>Returns the full URI of this template without any query data. | |
e.g. <code>http://myserver.net/myapp/stuff/View.vm</code> | |
Note! The returned String will not represent any URI reference | |
or query data set for this LinkTool. A typical application of | |
this method is with the HTML base tag. For example: | |
<code><base href="$link.baseRef"></code> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getSelf()"><!-- --></A><H3> | |
getSelf</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>getSelf</B>()</PRE> | |
<DL> | |
<DD>This method returns a new "self-referencing" LinkTool for the current | |
request. By default, this is merely a shortcut for calling | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#relative(java.lang.String)"><CODE>relative(String uri)</CODE></A> using the result of | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#getRequestPath()"><CODE>getRequestPath()</CODE></A>. However, this tool can be configured | |
to return an absolute URI and/or to include the parameters of the | |
current request (in addition to any others set so far). | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Since:</B></DT> | |
<DD>VelocityTools 1.3</DD> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#uri(java.lang.String)"><CODE>uri(String uri)</CODE></A>, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#configure(java.util.Map)"><CODE>configure(Map params)</CODE></A>, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfAbsolute(boolean)"><CODE>setSelfAbsolute(boolean selfAbsolute)</CODE></A>, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#setSelfIncludeParameters(boolean)"><CODE>setSelfIncludeParameters(boolean selfParams)</CODE></A>, | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toString()"><!-- --></A><H3> | |
toString</H3> | |
<PRE> | |
public java.lang.String <B>toString</B>()</PRE> | |
<DL> | |
<DD>Returns the full URI reference that's been built with this tool, | |
including the query string and anchor, e.g. | |
<code>http://myserver.net/myapp/stuff/View.vm?id=42&type=blue#foo</code>. | |
Typically, it is not necessary to call this method explicitely. | |
Velocity will call the toString() method automatically to obtain | |
a representable version of an object. | |
<P> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="encodeURL(java.lang.String)"><!-- --></A><H3> | |
encodeURL</H3> | |
<PRE> | |
public java.lang.String <B>encodeURL</B>(java.lang.String url)</PRE> | |
<DL> | |
<DD>Use the new URLEncoder.encode() method from java 1.4 if available, else | |
use the old deprecated version. This method uses reflection to find the appropriate | |
method; if the reflection operations throw exceptions, this will return the url | |
encoded with the old URLEncoder.encode() method. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>String - the encoded url.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addIgnore(java.lang.String)"><!-- --></A><H3> | |
addIgnore</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>addIgnore</B>(java.lang.String parameterName)</PRE> | |
<DL> | |
<DD>Instructs this LinkTool to ignore the specified parameter when | |
copying the current request's parameters. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>parameterName</CODE> - The name of the parameter to ignore.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addAllParameters()"><CODE>addAllParameters()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addAllParameters()"><!-- --></A><H3> | |
addAllParameters</H3> | |
<PRE> | |
public <A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html" title="class in org.apache.velocity.tools.view.tools">LinkTool</A> <B>addAllParameters</B>()</PRE> | |
<DL> | |
<DD>Adds all of the current request's parameters to this link's | |
"query data". Any parameters that have been set to be ignored | |
will be ignored. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>A LinkTool object with all of the current request's parameters | |
added to it.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.html#addIgnore(java.lang.String)"><CODE>addIgnore(String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/ImportTool.html" title="class in org.apache.velocity.tools.view.tools"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../../org/apache/velocity/tools/view/tools/LinkTool.QueryPair.html" title="class in org.apache.velocity.tools.view.tools"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../../index.html?org/apache/velocity/tools/view/tools/LinkTool.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="LinkTool.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright (c) 2003-2007 Apache Software Foundation | |
</BODY> | |
</HTML> |