<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!-- saved from url=(0014)about:internet --> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0_19) on Sun Mar 20 20:56:05 PKT 2011 --> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<TITLE> | |
Page (Click Framework API - v2.3.0) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.click.Page class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="Page (Click Framework API - v2.3.0)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white"> | |
<!-- ========= 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/click/ControlRegistry.html" title="class in org.apache.click"><B>PREV CLASS</B></A> | |
<A HREF="../../../org/apache/click/PageInterceptor.html" title="interface in org.apache.click"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../index.html?org/apache/click/Page.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="Page.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: NESTED | <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.click</FONT> | |
<BR> | |
Class Page</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.apache.click.Page</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DD> | |
</DL> | |
<DL> | |
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../org/apache/click/util/ErrorPage.html" title="class in org.apache.click.util">ErrorPage</A>, <A HREF="../../../org/apache/click/service/XmlConfigService.ExcludePage.html" title="class in org.apache.click.service">XmlConfigService.ExcludePage</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>Page</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DL> | |
</PRE> | |
<P> | |
Provides the Page request event handler class. | |
<p/> | |
The Page class plays a central role in Click applications defining how the | |
application's pages are processed and rendered. All application pages | |
must extend the base Page class, and provide a no arguments constructor. | |
<h4>Page Execution Sequence</h4> | |
The default Page execution path for a GET request is: | |
<ol> | |
<li class="spaced"> | |
no-args constructor invoked to create a new Page instance. | |
At this point no dependencies have been injected into the Page, and any | |
request information is not available. You should put any "static" | |
page initialization code, which doesn't depend upon request information, | |
in the constructor. This will enable subclasses to have this code | |
automatically initialized when they are created. | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#format"><CODE>format</CODE></A> property is set | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#headers"><CODE>headers</CODE></A> property is set | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> property is set | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#onSecurityCheck()"><CODE>onSecurityCheck()</CODE></A> method called to check whether the page should | |
be processed. This method should return true if the Page should continue | |
to be processed, or false otherwise. | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#onInit()"><CODE>onInit()</CODE></A> method called to complete the initialization of the page | |
after all the dependencies have been set. This is where you should put | |
any "dynamic" page initialization code which depends upon the request or any | |
other dependencies. | |
<p/> | |
Form and field controls must be fully initialized by the time this method | |
has completed. | |
</li> | |
<li class="spaced"> | |
ClickServlet processes all the page <A HREF="../../../org/apache/click/Page.html#controls"><CODE>controls</CODE></A> | |
calling their <A HREF="../../../org/apache/click/Control.html#onProcess()"><CODE>Control.onProcess()</CODE></A> method. If any of these | |
controls return false, continued control and page processing will be aborted. | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#onGet()"><CODE>onGet()</CODE></A> method called for any additional GET related processing. | |
<p/> | |
Form and field controls should <b>NOT</b> be created or initialized at this | |
point as the control processing stage has already been completed. | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#onRender()"><CODE>onRender()</CODE></A> method called for any pre-render processing. This | |
method is often use to perform database queries to load information for | |
rendering tables. | |
<p/> | |
Form and field controls should <b>NOT</b> be created or initialized at this | |
point as the control processing stage has already been completed. | |
</li> | |
<li class="spaced"> | |
ClickServlet renders the page merging the <A HREF="../../../org/apache/click/Page.html#model"><CODE>model</CODE></A> with the | |
Velocity template defined by the <A HREF="../../../org/apache/click/Page.html#getTemplate()"><CODE>getTemplate()</CODE></A> property. | |
</li> | |
<li class="spaced"> | |
<A HREF="../../../org/apache/click/Page.html#onDestroy()"><CODE>onDestroy()</CODE></A> method called to clean up any resources. This method | |
is guaranteed to be called, even if an exception occurs. You can use | |
this method to close resources like database connections or Hibernate | |
sessions. | |
</li> | |
</ol> | |
For POST requests the default execution path is identical, except the | |
<A HREF="../../../org/apache/click/Page.html#onPost()"><CODE>onPost()</CODE></A> method is called instead of <A HREF="../../../org/apache/click/Page.html#onGet()"><CODE>onGet()</CODE></A>. The POST | |
request page execution sequence is illustrated below: | |
<p/> | |
<img src="post-sequence-diagram.png"/> | |
<p/> | |
A good way to see the page event execution order is to view the log when | |
the application mode is set to <tt>trace</tt>: | |
<pre class="codeConfig" style="padding:1em;background-color:#f0f0f0;"> | |
[Click] [debug] GET http://localhost:8080/quickstart/home.htm | |
[Click] [trace] invoked: HomePage.<<init>> | |
[Click] [trace] invoked: HomePage.onSecurityCheck() : true | |
[Click] [trace] invoked: HomePage.onInit() | |
[Click] [trace] invoked: HomePage.onGet() | |
[Click] [trace] invoked: HomePage.onRender() | |
[Click] [info ] renderTemplate: /home.htm - 6 ms | |
[Click] [trace] invoked: HomePage.onDestroy() | |
[Click] [info ] handleRequest: /home.htm - 24 ms </pre> | |
<h4>Rendering Pages</h4> | |
When a Velocity template is rendered the ClickServlet uses Pages: | |
<ul> | |
<li><A HREF="../../../org/apache/click/Page.html#getTemplate()"><CODE>getTemplate()</CODE></A> to find the Velocity template.</li> | |
<li><A HREF="../../../org/apache/click/Page.html#model"><CODE>model</CODE></A> to populate the Velocity Context</li> | |
<li><A HREF="../../../org/apache/click/Page.html#format"><CODE>format</CODE></A> to add to the Velocity Context</li> | |
<li><A HREF="../../../org/apache/click/Page.html#getContentType()"><CODE>getContentType()</CODE></A> to set as the HttpServletResponse content type</li> | |
<li><A HREF="../../../org/apache/click/Page.html#headers"><CODE>headers</CODE></A> to set as the HttpServletResponse headers</li> | |
</ul> | |
These Page properties are also used when rendering JSP pages. | |
<P> | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#org.apache.click.Page">Serialized Form</A></DL> | |
<HR> | |
<P> | |
<!-- =========== 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>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#controls">controls</A></B></CODE> | |
<BR> | |
The list of page controls.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../org/apache/click/util/Format.html" title="class in org.apache.click.util">Format</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#format">format</A></B></CODE> | |
<BR> | |
The Velocity template formatter object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#forward">forward</A></B></CODE> | |
<BR> | |
The forward path.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/element/Element.html" title="class in org.apache.click.element">Element</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#headElements">headElements</A></B></CODE> | |
<BR> | |
The list of page HTML HEAD elements including: Javascript imports, | |
Css imports, inline Javascript and inline Css.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#headers">headers</A></B></CODE> | |
<BR> | |
The HTTP response headers.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#includeControlHeadElements">includeControlHeadElements</A></B></CODE> | |
<BR> | |
Indicates whether Control head elements should be included in the | |
page template, default value is true.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#messages">messages</A></B></CODE> | |
<BR> | |
The map of localized page resource messages.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#model">model</A></B></CODE> | |
<BR> | |
The page model.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#PAGE_ACTION">PAGE_ACTION</A></B></CODE> | |
<BR> | |
The Page action request parameter: "<tt>pageAction</tt>".</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#PAGE_MESSAGES">PAGE_MESSAGES</A></B></CODE> | |
<BR> | |
The global page messages bundle name: <tt>click-page</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../org/apache/click/util/PageImports.html" title="class in org.apache.click.util">PageImports</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#pageImports">pageImports</A></B></CODE> | |
<BR> | |
The Page header imports.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#path">path</A></B></CODE> | |
<BR> | |
The path of the page template to render.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#redirect">redirect</A></B></CODE> | |
<BR> | |
The redirect path.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#stateful">stateful</A></B></CODE> | |
<BR> | |
<B>Deprecated.</B> <I>stateful pages are not supported anymore, use stateful | |
Controls instead</I></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#template">template</A></B></CODE> | |
<BR> | |
The path of the page border template to render.</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/click/Page.html#Page()">Page</A></B>()</CODE> | |
<BR> | |
</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> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#addControl(org.apache.click.Control)">addControl</A></B>(<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A> control)</CODE> | |
<BR> | |
Add the control to the page.</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/click/Page.html#addModel(java.lang.String, java.lang.Object)">addModel</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</CODE> | |
<BR> | |
Add the named object value to the Pages model map.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getContentType()">getContentType</A></B>()</CODE> | |
<BR> | |
Return the HTTP response content type.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getContext()">getContext</A></B>()</CODE> | |
<BR> | |
Return the request context of the page.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getControls()">getControls</A></B>()</CODE> | |
<BR> | |
Return the list of page Controls.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../org/apache/click/util/Format.html" title="class in org.apache.click.util">Format</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getFormat()">getFormat</A></B>()</CODE> | |
<BR> | |
Return the Velocity template formatter object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getForward()">getForward</A></B>()</CODE> | |
<BR> | |
Return the path to forward the request to.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/element/Element.html" title="class in org.apache.click.element">Element</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getHeadElements()">getHeadElements</A></B>()</CODE> | |
<BR> | |
Return the list of HEAD <A HREF="../../../org/apache/click/element/Element.html" title="class in org.apache.click.element"><CODE>elements</CODE></A> | |
to be included in the page.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getHeaders()">getHeaders</A></B>()</CODE> | |
<BR> | |
Return the map of HTTP header to be set in the HttpServletResponse.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getHtmlImports()">getHtmlImports</A></B>()</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use the new <A HREF="../../../org/apache/click/Page.html#getHeadElements()"><CODE>getHeadElements()</CODE></A> instead</I></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getMessage(java.lang.String)">getMessage</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</CODE> | |
<BR> | |
Return the localized Page resource message for the given resource | |
name or null if not found.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getMessage(java.lang.String, java.lang.Object...)">getMessage</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>... args)</CODE> | |
<BR> | |
Return the formatted page message for the given resource name and | |
message format arguments or null if no message was found.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getMessages()">getMessages</A></B>()</CODE> | |
<BR> | |
Return a Map of localized messages for the Page.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getModel()">getModel</A></B>()</CODE> | |
<BR> | |
Return the Page's model map.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../org/apache/click/util/PageImports.html" title="class in org.apache.click.util">PageImports</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getPageImports()">getPageImports</A></B>()</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use the new <A HREF="../../../org/apache/click/Page.html#getHeadElements()"><CODE>getHeadElements()</CODE></A> instead</I></TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getPath()">getPath</A></B>()</CODE> | |
<BR> | |
Return the path of the Template or JSP to render.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getRedirect()">getRedirect</A></B>()</CODE> | |
<BR> | |
Return the path to redirect the request to.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#getTemplate()">getTemplate</A></B>()</CODE> | |
<BR> | |
Return the path of the page border template to render, by default this | |
method returns <A HREF="../../../org/apache/click/Page.html#getPath()"><CODE>getPath()</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#hasControls()">hasControls</A></B>()</CODE> | |
<BR> | |
Return true if the page has any controls defined.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#hasHeaders()">hasHeaders</A></B>()</CODE> | |
<BR> | |
Return true if the page has headers, false otherwise.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#isIncludeControlHeadElements()">isIncludeControlHeadElements</A></B>()</CODE> | |
<BR> | |
Return true if the Control head elements should be included in the page | |
template, false otherwise.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#isStateful()">isStateful</A></B>()</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>stateful pages are not supported anymore, use stateful | |
Controls instead</I></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/click/Page.html#onDestroy()">onDestroy</A></B>()</CODE> | |
<BR> | |
The on Destroy request event handler.</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/click/Page.html#onGet()">onGet</A></B>()</CODE> | |
<BR> | |
The on Get request event handler.</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/click/Page.html#onInit()">onInit</A></B>()</CODE> | |
<BR> | |
The on Initialization event handler.</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/click/Page.html#onPost()">onPost</A></B>()</CODE> | |
<BR> | |
The on Post request event handler.</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/click/Page.html#onRender()">onRender</A></B>()</CODE> | |
<BR> | |
The on render event handler.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../org/apache/click/Page.html#onSecurityCheck()">onSecurityCheck</A></B>()</CODE> | |
<BR> | |
The on Security Check event handler.</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/click/Page.html#removeControl(org.apache.click.Control)">removeControl</A></B>(<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A> control)</CODE> | |
<BR> | |
Remove the control from the page.</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/click/Page.html#setFormat(org.apache.click.util.Format)">setFormat</A></B>(<A HREF="../../../org/apache/click/util/Format.html" title="class in org.apache.click.util">Format</A> value)</CODE> | |
<BR> | |
Set the Velocity template formatter object.</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/click/Page.html#setForward(java.lang.Class)">setForward</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><? extends <A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>> pageClass)</CODE> | |
<BR> | |
Set the request to forward to the given page class.</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/click/Page.html#setForward(org.apache.click.Page)">setForward</A></B>(<A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A> page)</CODE> | |
<BR> | |
The Page instance to forward the request to.</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/click/Page.html#setForward(java.lang.String)">setForward</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the path to forward the request to.</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/click/Page.html#setHeader(java.lang.String, java.lang.Object)">setHeader</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</CODE> | |
<BR> | |
Set the named header with the given value.</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/click/Page.html#setHeaders(java.util.Map)">setHeaders</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>> value)</CODE> | |
<BR> | |
Set the map of HTTP header to be set in the HttpServletResponse.</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/click/Page.html#setIncludeControlHeadElements(boolean)">setIncludeControlHeadElements</A></B>(boolean includeControlHeadElements)</CODE> | |
<BR> | |
Set whether the Control head elements should be included in the page | |
template.</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/click/Page.html#setPageImports(org.apache.click.util.PageImports)">setPageImports</A></B>(<A HREF="../../../org/apache/click/util/PageImports.html" title="class in org.apache.click.util">PageImports</A> pageImports)</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use the new <A HREF="../../../org/apache/click/Page.html#getHeadElements()"><CODE>getHeadElements()</CODE></A> instead</I></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/click/Page.html#setPath(java.lang.String)">setPath</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the path of the Template or JSP to render.</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/click/Page.html#setRedirect(java.lang.Class)">setRedirect</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><? extends <A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>> pageClass)</CODE> | |
<BR> | |
Set the request to redirect to the give page class.</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/click/Page.html#setRedirect(java.lang.Class, java.util.Map)">setRedirect</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><? extends <A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>> pageClass, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?> params)</CODE> | |
<BR> | |
Set the request to redirect to the given page class and and append | |
the map of request parameters to the page URL.</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/click/Page.html#setRedirect(java.lang.String)">setRedirect</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> location)</CODE> | |
<BR> | |
Set the location to redirect the request to.</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/click/Page.html#setRedirect(java.lang.String, java.util.Map)">setRedirect</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> location, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?> params)</CODE> | |
<BR> | |
Set the request to redirect to the given <code>location</code> and append | |
the map of request parameters to the location URL.</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/click/Page.html#setStateful(boolean)">setStateful</A></B>(boolean stateful)</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>stateful pages are not supported anymore, use stateful | |
Controls instead</I></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/click/Page.html#setTemplate(java.lang.String)">setTemplate</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> template)</CODE> | |
<BR> | |
Set the page border template path.</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.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></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="PAGE_MESSAGES"><!-- --></A><H3> | |
PAGE_MESSAGES</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PAGE_MESSAGES</B></PRE> | |
<DL> | |
<DD>The global page messages bundle name: <tt>click-page</tt>. | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.Page.PAGE_MESSAGES">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="PAGE_ACTION"><!-- --></A><H3> | |
PAGE_ACTION</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PAGE_ACTION</B></PRE> | |
<DL> | |
<DD>The Page action request parameter: "<tt>pageAction</tt>". | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.Page.PAGE_ACTION">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="controls"><!-- --></A><H3> | |
controls</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A>> <B>controls</B></PRE> | |
<DL> | |
<DD>The list of page controls. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="headElements"><!-- --></A><H3> | |
headElements</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/element/Element.html" title="class in org.apache.click.element">Element</A>> <B>headElements</B></PRE> | |
<DL> | |
<DD>The list of page HTML HEAD elements including: Javascript imports, | |
Css imports, inline Javascript and inline Css. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="format"><!-- --></A><H3> | |
format</H3> | |
<PRE> | |
protected <A HREF="../../../org/apache/click/util/Format.html" title="class in org.apache.click.util">Format</A> <B>format</B></PRE> | |
<DL> | |
<DD>The Velocity template formatter object. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="forward"><!-- --></A><H3> | |
forward</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>forward</B></PRE> | |
<DL> | |
<DD>The forward path. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="headers"><!-- --></A><H3> | |
headers</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>> <B>headers</B></PRE> | |
<DL> | |
<DD>The HTTP response headers. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="messages"><!-- --></A><H3> | |
messages</H3> | |
<PRE> | |
protected transient <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>messages</B></PRE> | |
<DL> | |
<DD>The map of localized page resource messages. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="model"><!-- --></A><H3> | |
model</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>> <B>model</B></PRE> | |
<DL> | |
<DD>The page model. For Velocity templates the model is used to populate the | |
Velocity context. For JSP pages the model values are set as named | |
request attributes. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="pageImports"><!-- --></A><H3> | |
pageImports</H3> | |
<PRE> | |
protected transient <A HREF="../../../org/apache/click/util/PageImports.html" title="class in org.apache.click.util">PageImports</A> <B>pageImports</B></PRE> | |
<DL> | |
<DD>The Page header imports. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="path"><!-- --></A><H3> | |
path</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>path</B></PRE> | |
<DL> | |
<DD>The path of the page template to render. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="redirect"><!-- --></A><H3> | |
redirect</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>redirect</B></PRE> | |
<DL> | |
<DD>The redirect path. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="stateful"><!-- --></A><H3> | |
stateful</H3> | |
<PRE> | |
protected boolean <B>stateful</B></PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>stateful pages are not supported anymore, use stateful | |
Controls instead</I><DD>The page is stateful and should be saved to the users HttpSession | |
between requests, default value is false. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="template"><!-- --></A><H3> | |
template</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>template</B></PRE> | |
<DL> | |
<DD>The path of the page border template to render. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="includeControlHeadElements"><!-- --></A><H3> | |
includeControlHeadElements</H3> | |
<PRE> | |
protected boolean <B>includeControlHeadElements</B></PRE> | |
<DL> | |
<DD>Indicates whether Control head elements should be included in the | |
page template, default value is true. | |
<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="Page()"><!-- --></A><H3> | |
Page</H3> | |
<PRE> | |
public <B>Page</B>()</PRE> | |
<DL> | |
</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="onSecurityCheck()"><!-- --></A><H3> | |
onSecurityCheck</H3> | |
<PRE> | |
public boolean <B>onSecurityCheck</B>()</PRE> | |
<DL> | |
<DD>The on Security Check event handler. This event handler is invoked after | |
the pages constructor has been called and all the page properties have | |
been set. | |
<p/> | |
Security check provides the Page an opportunity to check the users | |
security credentials before processing the Page. | |
<p/> | |
If security check returns true the Page is processed as | |
normal. If the method returns then no other event handlers are invoked | |
(except <tt>onDestroy()</tt> and no page controls are processed. | |
<p/> | |
If the method returns false, the forward or redirect property should be | |
set to send the request to another Page. | |
<p/> | |
By default this method returns true, subclass may override this method | |
to provide their security authorization/authentication mechanism. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true by default, subclasses may override this method</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onInit()"><!-- --></A><H3> | |
onInit</H3> | |
<PRE> | |
public void <B>onInit</B>()</PRE> | |
<DL> | |
<DD>The on Initialization event handler. This event handler is invoked after | |
the <A HREF="../../../org/apache/click/Page.html#onInit()"><CODE>onInit()</CODE></A> method has been called. | |
<p/> | |
Subclasses should place any initialization code which has dependencies | |
on the context or other properties in this method. Generally light | |
weight initialization code should be placed in the Pages constructor. | |
<p/> | |
Time consuming operations such as fetching the results of a database | |
query should not be placed in this method. These operations should be | |
performed in the <A HREF="../../../org/apache/click/Page.html#onRender()"><CODE>onRender()</CODE></A>, <A HREF="../../../org/apache/click/Page.html#onGet()"><CODE>onGet()</CODE></A> or | |
<A HREF="../../../org/apache/click/Page.html#onPost()"><CODE>onPost()</CODE></A> methods so that other event handlers may take | |
alternative execution paths without performing these expensive operations. | |
<p/> | |
<b>Please Note</b> however the qualifier for the previous statement is | |
that all form and field controls must be fully initialized before they | |
are processed, which is after the <tt>onInit()</tt> method has | |
completed. After this point their <tt>onProcess()</tt> methods will be | |
invoked by the <tt>ClickServlet</tt>. | |
<p/> | |
Select controls in particular must have their option list values populated | |
before the form is processed otherwise field validations cannot be performed. | |
<p/> | |
For initializing page controls the best practice is to place all the | |
control creation code in the pages constructor, and only place any | |
initialization code in the <tt>onInit()</tt> method which has an external | |
dependency to the context or some other object. By following this practice | |
it is easy to see what code is "design time" initialization code and what | |
is "runtime initialization code". | |
<p/> | |
When subclassing pages which also use the <tt>onInit()</tt> method is | |
is critical you call the <tt>super.onInit()</tt> method first, for | |
example: | |
<pre class="javaCode"> | |
<span class="kw">public void</span> onInit() { | |
<span class="kw">super</span>.onInit(); | |
// Initialization code | |
.. | |
} </pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onGet()"><!-- --></A><H3> | |
onGet</H3> | |
<PRE> | |
public void <B>onGet</B>()</PRE> | |
<DL> | |
<DD>The on Get request event handler. This event handler is invoked if the | |
HTTP request method is "GET". | |
<p/> | |
The event handler is invoked after <A HREF="../../../org/apache/click/Page.html#onSecurityCheck()"><CODE>onSecurityCheck()</CODE></A> has been | |
called and all the Page <A HREF="../../../org/apache/click/Page.html#controls"><CODE>controls</CODE></A> have been processed. If either | |
the security check or one of the controls cancels continued event | |
processing the <tt>onGet()</tt> method will not be invoked. | |
<h4>Important Note</h4> | |
Form and field controls should <b>NOT</b> be created | |
or initialized at this point as the control processing stage has already | |
been completed. Select option list values should also be populated | |
before the control processing stage is performed so that they can | |
validate the submitted values. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onPost()"><!-- --></A><H3> | |
onPost</H3> | |
<PRE> | |
public void <B>onPost</B>()</PRE> | |
<DL> | |
<DD>The on Post request event handler. This event handler is invoked if the | |
HTTP request method is "POST". | |
<p/> | |
The event handler is invoked after <A HREF="../../../org/apache/click/Page.html#onSecurityCheck()"><CODE>onSecurityCheck()</CODE></A> has been | |
called and all the Page <A HREF="../../../org/apache/click/Page.html#controls"><CODE>controls</CODE></A> have been processed. If either | |
the security check or one of the controls cancels continued event | |
processing the <tt>onPost()</tt> method will not be invoked. | |
<h4>Important Note</h4> | |
Form and field controls should <b>NOT</b> be created | |
or initialized at this point as the control processing stage has already | |
been completed. Select option list values should also be populated | |
before the control processing stage is performed so that they can | |
validate the submitted values. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onRender()"><!-- --></A><H3> | |
onRender</H3> | |
<PRE> | |
public void <B>onRender</B>()</PRE> | |
<DL> | |
<DD>The on render event handler. This event handler is invoked prior to the | |
page being rendered. | |
<p/> | |
This method will not be invoked if either the security check or one of | |
the controls cancels continued event processing. | |
<p/> | |
The on render method is typically used to populate tables performing some | |
database intensive operation. By putting the intensive operations in the | |
on render method they will not be performed if the user navigates away | |
to a different page. | |
<p/> | |
If you have code which you are using in both the <tt>onGet()</tt> and | |
<tt>onPost()</tt> methods, use the <tt>onRender()</tt> method instead. | |
<h4>Important Note</h4> | |
Form and field controls should <b>NOT</b> be created | |
or initialized at this point as the control processing stage has already | |
been completed. Select option list values should also be populated | |
before the control processing stage is performed so that they can | |
validate the submitted values. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onDestroy()"><!-- --></A><H3> | |
onDestroy</H3> | |
<PRE> | |
public void <B>onDestroy</B>()</PRE> | |
<DL> | |
<DD>The on Destroy request event handler. Subclasses may override this method | |
to add any resource clean up code. | |
<p/> | |
This method is guaranteed to be called before the Page object reference | |
goes out of scope and is available for garbage collection. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addControl(org.apache.click.Control)"><!-- --></A><H3> | |
addControl</H3> | |
<PRE> | |
public void <B>addControl</B>(<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A> control)</PRE> | |
<DL> | |
<DD>Add the control to the page. The control will be added to the page model | |
using the control name as the key. The Controls parent property will | |
also be set to the page instance. | |
<p/> | |
<b>Please note</b>: if the page contains a control with the same name as | |
the given control, that control will be replaced by the given control. | |
If a control has no name defined it cannot be replaced. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>control</CODE> - the control to add to the page | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the control is null or if the name | |
of the control is not defined</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="removeControl(org.apache.click.Control)"><!-- --></A><H3> | |
removeControl</H3> | |
<PRE> | |
public void <B>removeControl</B>(<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A> control)</PRE> | |
<DL> | |
<DD>Remove the control from the page. The control will be removed from the | |
pages model and the control parent property will be set to null. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>control</CODE> - the control to remove | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the control is null, or if the name | |
of the control is not defined</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getControls()"><!-- --></A><H3> | |
getControls</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A>> <B>getControls</B>()</PRE> | |
<DL> | |
<DD>Return the list of page Controls. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the list of page Controls</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasControls()"><!-- --></A><H3> | |
hasControls</H3> | |
<PRE> | |
public boolean <B>hasControls</B>()</PRE> | |
<DL> | |
<DD>Return true if the page has any controls defined. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the page has any controls defined</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getContext()"><!-- --></A><H3> | |
getContext</H3> | |
<PRE> | |
public <A HREF="../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> <B>getContext</B>()</PRE> | |
<DL> | |
<DD>Return the request context of the page. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the request context of the page</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getContentType()"><!-- --></A><H3> | |
getContentType</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getContentType</B>()</PRE> | |
<DL> | |
<DD>Return the HTTP response content type. By default this method returns | |
<tt>"text/html"</tt>. | |
<p/> | |
If the request specifies a character encoding via | |
If <A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html#getCharacterEncoding()" title="class or interface in javax.servlet"><CODE>ServletRequest.getCharacterEncoding()</CODE></A> | |
then this method will return <tt>"text/html; charset=encoding"</tt>. | |
<p/> | |
The ClickServlet uses the pages content type for setting the | |
HttpServletResponse content type. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the HTTP response content type</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getFormat()"><!-- --></A><H3> | |
getFormat</H3> | |
<PRE> | |
public <A HREF="../../../org/apache/click/util/Format.html" title="class in org.apache.click.util">Format</A> <B>getFormat</B>()</PRE> | |
<DL> | |
<DD>Return the Velocity template formatter object. | |
<p/> | |
The ClickServlet adds the format object to the Velocity context using | |
the key <tt>"format"</tt> so that it can be used in the page template. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Velocity template formatter object</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setFormat(org.apache.click.util.Format)"><!-- --></A><H3> | |
setFormat</H3> | |
<PRE> | |
public void <B>setFormat</B>(<A HREF="../../../org/apache/click/util/Format.html" title="class in org.apache.click.util">Format</A> value)</PRE> | |
<DL> | |
<DD>Set the Velocity template formatter object. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the Velocity template formatter object.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getForward()"><!-- --></A><H3> | |
getForward</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getForward</B>()</PRE> | |
<DL> | |
<DD>Return the path to forward the request to. | |
<p/> | |
If the <A HREF="../../../org/apache/click/Page.html#forward"><CODE>forward</CODE></A> property is not null it will be used to forward | |
the request to in preference to rendering the template defined by the | |
<A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> property. The request is forwarded using the | |
RequestDispatcher. | |
<p/> | |
See also <A HREF="../../../org/apache/click/Page.html#getPath()"><CODE>getPath()</CODE></A>, <A HREF="../../../org/apache/click/Page.html#getRedirect()"><CODE>getRedirect()</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the path to forward the request to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setForward(java.lang.String)"><!-- --></A><H3> | |
setForward</H3> | |
<PRE> | |
public void <B>setForward</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the path to forward the request to. | |
<p/> | |
If the <A HREF="../../../org/apache/click/Page.html#forward"><CODE>forward</CODE></A> property is not null it will be used to forward | |
the request to in preference to rendering the template defined by the | |
<A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> property. The request is forwarded using the Servlet | |
RequestDispatcher. | |
<p/> | |
If forward paths start with a <span class="wr">"/"</span> | |
character the forward path is | |
relative to web applications root context, otherwise the path is | |
relative to the requests current location. | |
<p/> | |
For example given a web application deployed to context <tt>mycorp</tt> | |
with the pages: | |
<pre class="codeConfig" style="color:navy"> | |
/index.htm | |
/customer/search.htm | |
/customer/details.htm | |
/customer/management/add-customer.htm </pre> | |
To forward to the customer <tt class="wr">search.htm</tt> page from | |
the web app root you could set forward as | |
<tt>setForward(<span class="navy">"/customer/search.htm"</span>)</tt> | |
or <tt>setForward(<span class="navy">"customer/search.htm"</span>)</tt>. | |
<p/> | |
If a user was currently viewing the <tt class="wr">add-customer.htm</tt> | |
to forward to customer <span class="wr">details.htm</span> you could | |
set forward as | |
<tt>setForward(<span class="navy">"/customer/details.htm"</span>)</tt> | |
or <tt>setForward(<span class="navy">"../details.htm"</span>)</tt>. | |
<p/> | |
See also <A HREF="../../../org/apache/click/Page.html#setPath(java.lang.String)"><CODE>setPath(String)</CODE></A>, <A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.String)"><CODE>setRedirect(String)</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the path to forward the request to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setForward(org.apache.click.Page)"><!-- --></A><H3> | |
setForward</H3> | |
<PRE> | |
public void <B>setForward</B>(<A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A> page)</PRE> | |
<DL> | |
<DD>The Page instance to forward the request to. The given Page object | |
must have a valid <A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> defined, as the <A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> specifies | |
the location to forward to. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>page</CODE> - the Page object to forward the request to.<DT><B>See Also:</B><DD><A HREF="../../../org/apache/click/Page.html#setForward(java.lang.String)"><CODE>setForward(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setForward(java.lang.Class)"><!-- --></A><H3> | |
setForward</H3> | |
<PRE> | |
public void <B>setForward</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><? extends <A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>> pageClass)</PRE> | |
<DL> | |
<DD>Set the request to forward to the given page class. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>pageClass</CODE> - the class of the Page to forward the request to | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the Page Class is not configured | |
with a unique path<DT><B>See Also:</B><DD><A HREF="../../../org/apache/click/Page.html#setForward(java.lang.String)"><CODE>setForward(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getHeaders()"><!-- --></A><H3> | |
getHeaders</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>> <B>getHeaders</B>()</PRE> | |
<DL> | |
<DD>Return the map of HTTP header to be set in the HttpServletResponse. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the map of HTTP header to be set in the HttpServletResponse</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasHeaders()"><!-- --></A><H3> | |
hasHeaders</H3> | |
<PRE> | |
public boolean <B>hasHeaders</B>()</PRE> | |
<DL> | |
<DD>Return true if the page has headers, false otherwise. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the page has headers, false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setHeader(java.lang.String, java.lang.Object)"><!-- --></A><H3> | |
setHeader</H3> | |
<PRE> | |
public void <B>setHeader</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE> | |
<DL> | |
<DD>Set the named header with the given value. Value can be either a String, | |
Date or Integer. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the header<DD><CODE>value</CODE> - the value of the header, either a String, Date or Integer</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setHeaders(java.util.Map)"><!-- --></A><H3> | |
setHeaders</H3> | |
<PRE> | |
public void <B>setHeaders</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>> value)</PRE> | |
<DL> | |
<DD>Set the map of HTTP header to be set in the HttpServletResponse. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the map of HTTP header to be set in the HttpServletResponse</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getHtmlImports()"><!-- --></A><H3> | |
getHtmlImports</H3> | |
<PRE> | |
public final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getHtmlImports</B>()</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use the new <A HREF="../../../org/apache/click/Page.html#getHeadElements()"><CODE>getHeadElements()</CODE></A> instead</I> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the HTML includes statements for the control stylesheet and | |
JavaScript files</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getHeadElements()"><!-- --></A><H3> | |
getHeadElements</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../org/apache/click/element/Element.html" title="class in org.apache.click.element">Element</A>> <B>getHeadElements</B>()</PRE> | |
<DL> | |
<DD>Return the list of HEAD <A HREF="../../../org/apache/click/element/Element.html" title="class in org.apache.click.element"><CODE>elements</CODE></A> | |
to be included in the page. Example HEAD elements include | |
<A HREF="../../../org/apache/click/element/JsImport.html" title="class in org.apache.click.element"><CODE>JsImport</CODE></A>, | |
<A HREF="../../../org/apache/click/element/JsScript.html" title="class in org.apache.click.element"><CODE>JsScript</CODE></A>, | |
<A HREF="../../../org/apache/click/element/CssImport.html" title="class in org.apache.click.element"><CODE>CssImport</CODE></A> and | |
<A HREF="../../../org/apache/click/element/CssStyle.html" title="class in org.apache.click.element"><CODE>CssStyle</CODE></A>. | |
<p/> | |
Pages can contribute their own list of HEAD elements by overriding | |
this method. | |
<p/> | |
The recommended approach when overriding this method is to use | |
<tt>lazy loading</tt> to ensure the HEAD elements are only added | |
<tt>once</tt> and when <tt>needed</tt>. For example: | |
<pre class="prettyprint"> | |
public MyPage extends Page { | |
public List getHeadElements() { | |
// Use lazy loading to ensure the JS is only added the | |
// first time this method is called. | |
if (headElements == null) { | |
// Get the head elements from the super implementation | |
headElements = super.getHeadElements(); | |
// Include the page's external Javascript resource | |
JsImport jsImport = new JsImport("/mycorp/js/mypage.js"); | |
headElements.add(jsImport); | |
// Include the page's external Css resource | |
CssImport cssImport = new CssImport("/mycorp/js/mypage.css"); | |
headElements.add(cssImport); | |
} | |
return headElements; | |
} | |
} </pre> | |
Alternatively one can add the HEAD elements in the Page constructor: | |
<pre class="prettyprint"> | |
public MyPage extends Page { | |
public MyPage() { | |
JsImport jsImport = new JsImport("/mycorp/js/mypage.js"); | |
getHeadElements().add(jsImport); | |
CssImport cssImport = new CssImport("/mycorp/js/mypage.css"); | |
getHeadElements().add(cssImport); | |
} | |
} </pre> | |
One can also add HEAD elements from event handler methods such as | |
<A HREF="../../../org/apache/click/Page.html#onInit()"><CODE>onInit()</CODE></A>, <A HREF="../../../org/apache/click/Page.html#onGet()"><CODE>onGet()</CODE></A>, <A HREF="../../../org/apache/click/Page.html#onPost()"><CODE>onPost()</CODE></A>, <A HREF="../../../org/apache/click/Page.html#onRender()"><CODE>onRender()</CODE></A> | |
etc. | |
<p/> | |
The order in which JS and CSS files are included will be preserved in the | |
page. | |
<p/> | |
<b>Note:</b> this method must never return null. If no HEAD elements | |
are available this method must return an empty <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util"><CODE>List</CODE></A>. | |
<p/> | |
<b>Also note:</b> a common problem when overriding getHeadElements in | |
subclasses is forgetting to call <em>super.getHeadElements</em>. Consider | |
carefully whether you should call <em>super.getHeadElements</em> or not. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the list of HEAD elements to be included in the page</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMessage(java.lang.String)"><!-- --></A><H3> | |
getMessage</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getMessage</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name)</PRE> | |
<DL> | |
<DD>Return the localized Page resource message for the given resource | |
name or null if not found. The resource message returned will use the | |
Locale obtained from the Context. | |
<p/> | |
Pages can define text properties files to store localized messages. These | |
properties files must be stored on the Page class path with a name | |
matching the class name. For example: | |
<p/> | |
The page class: | |
<pre class="codeJava"> | |
<span class="kw">package</span> com.mycorp.pages; | |
<span class="kw">public class</span> Login <span class="kw">extends</span> Page { | |
.. </pre> | |
The page class property filenames and their path: | |
<pre class="codeConfig"> | |
/com/mycorp/pages/Login.properties | |
/com/mycorp/pages/Login_en.properties | |
/com/mycorp/pages/Login_fr.properties </pre> | |
Page messages can also be defined in the optional global messages | |
bundle: | |
<pre class="codeConfig"> | |
/click-page.properties </pre> | |
To define global page messages simply add <tt>click-page.properties</tt> | |
file to your application's class path. Message defined in this properties | |
file will be available to all of your application pages. | |
<p/> | |
Note messages in your page class properties file will override any | |
messages in the global <tt>click-page.properties</tt> file. | |
<p/> | |
Page messages can be accessed directly in the page template using | |
the <span class="st">$messages</span> reference. For examples: | |
<pre class="codeHtml"> | |
<span class="blue">$messages.title</span> </pre> | |
Please see the <A HREF="../../../org/apache/click/util/MessagesMap.html" title="class in org.apache.click.util"><CODE>MessagesMap</CODE></A> adaptor for more | |
details. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - resource name of the message | |
<DT><B>Returns:</B><DD>the named localized message for the page or null if no message | |
was found</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMessage(java.lang.String, java.lang.Object...)"><!-- --></A><H3> | |
getMessage</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getMessage</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>... args)</PRE> | |
<DL> | |
<DD>Return the formatted page message for the given resource name and | |
message format arguments or null if no message was found. The resource | |
message returned will use the Locale obtained from the Context. | |
<p/> | |
<A HREF="../../../org/apache/click/Page.html#getMessage(java.lang.String)"><CODE>getMessage(java.lang.String)</CODE></A> is invoked to retrieve the message | |
for the specified name. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - resource name of the message<DD><CODE>args</CODE> - the message arguments to format | |
<DT><B>Returns:</B><DD>the named localized message for the page or null if no message | |
was found</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMessages()"><!-- --></A><H3> | |
getMessages</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getMessages</B>()</PRE> | |
<DL> | |
<DD>Return a Map of localized messages for the Page. The messages returned | |
will use the Locale obtained from the Context. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>a Map of localized messages for the Page | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the context for the Page has not be set<DT><B>See Also:</B><DD><A HREF="../../../org/apache/click/Page.html#getMessage(java.lang.String)"><CODE>getMessage(String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addModel(java.lang.String, java.lang.Object)"><!-- --></A><H3> | |
addModel</H3> | |
<PRE> | |
public void <B>addModel</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE> | |
<DL> | |
<DD>Add the named object value to the Pages model map. | |
<p/> | |
<b>Please note</b>: if the Page contains an object with a matching name, | |
that object will be replaced by the given value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the key name of the object to add<DD><CODE>value</CODE> - the object to add | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the name or value parameters are | |
null</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getModel()"><!-- --></A><H3> | |
getModel</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>> <B>getModel</B>()</PRE> | |
<DL> | |
<DD>Return the Page's model map. The model is used populate the | |
Velocity Context with is merged with the page template before rendering. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Page's model map</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getPageImports()"><!-- --></A><H3> | |
getPageImports</H3> | |
<PRE> | |
public <A HREF="../../../org/apache/click/util/PageImports.html" title="class in org.apache.click.util">PageImports</A> <B>getPageImports</B>()</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use the new <A HREF="../../../org/apache/click/Page.html#getHeadElements()"><CODE>getHeadElements()</CODE></A> instead</I> | |
<P> | |
<DD>Return the Page header imports. | |
<p/> | |
PageImports are used define the CSS and JavaScript imports and blocks | |
to be included in the page template. | |
<p/> | |
The PageImports object will be included in the Page template when the | |
following methods are invoked: | |
<ul> | |
<li><A HREF="../../../org/apache/click/ClickServlet.html#createTemplateModel(org.apache.click.Page)"><CODE>ClickServlet.createTemplateModel(Page)</CODE></A> - for template pages</li> | |
<li><A HREF="../../../org/apache/click/ClickServlet.html#setRequestAttributes(org.apache.click.Page)"><CODE>ClickServlet.setRequestAttributes(Page)</CODE></A> - for JSP pages</li> | |
</ul> | |
<p/> | |
If you need to tailor the page imports rendered, override this method | |
and modify the PageImports object returned. | |
<p/> | |
If you need to create a custom PageImports, override the method | |
<A HREF="../../../org/apache/click/ClickServlet.html#createPageImports(org.apache.click.Page)"><CODE>ClickServlet.createPageImports(org.apache.click.Page)</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Page header imports</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setPageImports(org.apache.click.util.PageImports)"><!-- --></A><H3> | |
setPageImports</H3> | |
<PRE> | |
public void <B>setPageImports</B>(<A HREF="../../../org/apache/click/util/PageImports.html" title="class in org.apache.click.util">PageImports</A> pageImports)</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use the new <A HREF="../../../org/apache/click/Page.html#getHeadElements()"><CODE>getHeadElements()</CODE></A> instead</I> | |
<P> | |
<DD>Set the Page header imports. | |
<p/> | |
PageImports are used define the CSS and JavaScript imports and blocks | |
to be included in the page template. | |
<p/> | |
The PageImports references will be included in the Page model when the | |
following methods are invoked: | |
<ul> | |
<li><A HREF="../../../org/apache/click/ClickServlet.html#createTemplateModel(org.apache.click.Page)"><CODE>ClickServlet.createTemplateModel(Page)</CODE></A> - for template pages</li> | |
<li><A HREF="../../../org/apache/click/ClickServlet.html#setRequestAttributes(org.apache.click.Page)"><CODE>ClickServlet.setRequestAttributes(Page)</CODE></A> - for JSP pages</li> | |
</ul> | |
<p/> | |
If you need to tailor the page imports rendered, override the | |
<A HREF="../../../org/apache/click/Page.html#getPageImports()"><CODE>getPageImports()</CODE></A> method and modify the PageImports object | |
returned. | |
<p/> | |
If you need to create a custom PageImports, override the method | |
<A HREF="../../../org/apache/click/ClickServlet.html#createPageImports(org.apache.click.Page)"><CODE>ClickServlet.createPageImports(org.apache.click.Page)</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>pageImports</CODE> - the new pageImports instance to set</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getPath()"><!-- --></A><H3> | |
getPath</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getPath</B>()</PRE> | |
<DL> | |
<DD>Return the path of the Template or JSP to render. | |
<p/> | |
If this method returns <tt>null</tt>, Click will not perform any rendering. | |
This is useful when you want to stream or write directly to the | |
HttpServletResponse. | |
<p/> | |
See also <A HREF="../../../org/apache/click/Page.html#getForward()"><CODE>getForward()</CODE></A>, <A HREF="../../../org/apache/click/Page.html#getRedirect()"><CODE>getRedirect()</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the path of the Template or JSP to render</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setPath(java.lang.String)"><!-- --></A><H3> | |
setPath</H3> | |
<PRE> | |
public void <B>setPath</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the path of the Template or JSP to render. | |
<p/> | |
By default Click will set the path to the requested page url. Meaning | |
if the url <tt>/edit-customer.htm</tt> is requested, path will be set | |
to <tt>/edit-customer.htm</tt>. | |
<p/> | |
Here is an example if you want to change the path to a different Template: | |
<p/> | |
<pre class="prettyprint"> | |
public void onGet() { | |
setPath("/some-other-template.htm"); | |
}</pre> | |
And here is an example if you want to change the path to a different JSP. | |
<pre class="prettyprint"> | |
public void onGet() { | |
setPath("/some-other-jsp.jsp"); | |
}</pre> | |
<p/> | |
If path is set to <tt>null</tt>, Click will not perform any rendering. | |
This is useful when you want to stream or write directly to the | |
HttpServletResponse. | |
<p/> | |
See also <A HREF="../../../org/apache/click/Page.html#setForward(java.lang.String)"><CODE>setForward(String)</CODE></A>, <A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.String)"><CODE>setRedirect(String)</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the path of the Template or JSP to render</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRedirect()"><!-- --></A><H3> | |
getRedirect</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getRedirect</B>()</PRE> | |
<DL> | |
<DD>Return the path to redirect the request to. | |
<p/> | |
If the <A HREF="../../../org/apache/click/Page.html#redirect"><CODE>redirect</CODE></A> property is not null it will be used to redirect | |
the request in preference to <A HREF="../../../org/apache/click/Page.html#forward"><CODE>forward</CODE></A> or <A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> properties. | |
The request is redirected to using the HttpServletResponse.setRedirect() | |
method. | |
<p/> | |
See also <A HREF="../../../org/apache/click/Page.html#getForward()"><CODE>getForward()</CODE></A>, <A HREF="../../../org/apache/click/Page.html#getPath()"><CODE>getPath()</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the path to redirect the request to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isStateful()"><!-- --></A><H3> | |
isStateful</H3> | |
<PRE> | |
public boolean <B>isStateful</B>()</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>stateful pages are not supported anymore, use stateful | |
Controls instead</I> | |
<P> | |
<DD>Return true if the page is stateful and should be saved in the users | |
HttpSession between requests, default value is false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the page is stateful and should be saved in the users | |
session</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setStateful(boolean)"><!-- --></A><H3> | |
setStateful</H3> | |
<PRE> | |
public void <B>setStateful</B>(boolean stateful)</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>stateful pages are not supported anymore, use stateful | |
Controls instead</I> | |
<P> | |
<DD>Set whether the page is stateful and should be saved in the users | |
HttpSession between requests. | |
<p/> | |
Click will synchronize on the page instance. This ensures that if | |
multiple requests arrive from the same user for the page, only one | |
request can access the page at a time. | |
<p/> | |
Stateful pages are stored in the HttpSession using the key | |
<tt>page.getClass().getName()</tt>. | |
<p/> | |
It is worth noting that Click checks a Page's stateful property after | |
each request. Thus it becomes possible to enable a stateful Page for a | |
number of requests and then setting it to <tt>false</tt> again at which | |
point Click will remove the Page from the HttpSession, freeing up memory | |
for the server. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>stateful</CODE> - the flag indicating whether the page should be saved | |
between user requests</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isIncludeControlHeadElements()"><!-- --></A><H3> | |
isIncludeControlHeadElements</H3> | |
<PRE> | |
public boolean <B>isIncludeControlHeadElements</B>()</PRE> | |
<DL> | |
<DD>Return true if the Control head elements should be included in the page | |
template, false otherwise. Default value is true. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Control head elements should be included in the page | |
template, false otherwise<DT><B>See Also:</B><DD><A HREF="../../../org/apache/click/Page.html#setIncludeControlHeadElements(boolean)"><CODE>setIncludeControlHeadElements(boolean)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setIncludeControlHeadElements(boolean)"><!-- --></A><H3> | |
setIncludeControlHeadElements</H3> | |
<PRE> | |
public void <B>setIncludeControlHeadElements</B>(boolean includeControlHeadElements)</PRE> | |
<DL> | |
<DD>Set whether the Control head elements should be included in the page | |
template. | |
<p/> | |
By setting this value to <tt>false</tt>, Click won't include Control's | |
<A HREF="../../../org/apache/click/Page.html#getHeadElements()"><CODE>head elements</CODE></A>, however the Page head elements | |
will still be included. | |
<p/> | |
This allows one to create a single JavaScript and CSS resource file for | |
the entire Page which increases performance, since the browser only has | |
to load one resource, instead of multiple resources. | |
<p/> | |
Below is an example: | |
<pre class="prettyprint"> | |
public class HomePage extends Page { | |
private Form form = new Form("form"); | |
public HomePage() { | |
// Indicate that Controls should not import their head elements | |
setIncludeControlHeadElements(false); | |
form.add(new EmailField("email"); | |
addControl(form); | |
} | |
// Include the Page JavaScript and CSS resources | |
public List getHeadElements() { | |
if (headElements == null) { | |
headElements = super.getHeadElements(); | |
// Include the Page CSS resource. This resource should combine | |
// all the CSS necessary for the page | |
headElements.add(new CssImport("/assets/css/home-page.css")); | |
// Include the Page JavaScript resource. This resource should | |
// combine all the JavaScript necessary for the page | |
headElements.add(new JsImport("/assets/js/home-page.js")); | |
} | |
return headElements; | |
} | |
} </pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>includeControlHeadElements</CODE> - flag indicating whether Control | |
head elements should be included in the page</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRedirect(java.lang.String)"><!-- --></A><H3> | |
setRedirect</H3> | |
<PRE> | |
public void <B>setRedirect</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> location)</PRE> | |
<DL> | |
<DD>Set the location to redirect the request to. | |
<p/> | |
If the <A HREF="../../../org/apache/click/Page.html#redirect"><CODE>redirect</CODE></A> property is not null it will be used to redirect | |
the request in preference to the <A HREF="../../../org/apache/click/Page.html#forward"><CODE>forward</CODE></A> and <A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> | |
properties. The request is redirected using the HttpServletResponse.setRedirect() | |
method. | |
<p/> | |
If the redirect location begins with a <tt class="wr">"/"</tt> | |
character the redirect location will be prefixed with the web applications | |
<tt>context path</tt>. Note if the given location is already prefixed | |
with the <tt>context path</tt>, Click won't add it a second time. | |
<p/> | |
For example if an application is deployed to the context | |
<tt class="wr">"mycorp"</tt> calling | |
<tt>setRedirect(<span class="navy">"/customer/details.htm"</span>)</tt> | |
will redirect the request to: | |
<tt class="wr">"/mycorp/customer/details.htm"</tt> | |
<p/> | |
If the redirect location does not begin with a <tt class="wr">"/"</tt> | |
character the redirect location will be used as specified. Thus if the | |
location is <tt class="wr">http://somehost.com/myapp/customer.jsp</tt>, | |
Click will redirect to that location. | |
<p/> | |
<b>JSP note:</b> when redirecting to a JSP template keep in mind that the | |
JSP template won't be processed by Click, as ClickServlet is mapped to | |
<em>*.htm</em>. Instead JSP templates are processed by the Servlet | |
container JSP engine. | |
<p/> | |
So if you have a situation where a Page Class | |
(<span class="navy">Customer.class</span>) is mapped to the JSP | |
(<span class="navy">"/customer.jsp"</span>) and you want to redirect to | |
Customer.class, you could either redirect to | |
(<span class="navy">"/customer<span class="red">.htm</span>"</span>) or | |
use the alternative redirect utility <A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.Class)"><CODE>setRedirect(java.lang.Class)</CODE></A>. | |
<p/> | |
<b>Please note</b> that Click will url encode the location by invoking | |
<tt>response.encodeRedirectURL(location)</tt> before redirecting. | |
<p/> | |
See also <A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.String, java.util.Map)"><CODE>setRedirect(java.lang.String, java.util.Map)</CODE></A>, | |
<A HREF="../../../org/apache/click/Page.html#setForward(java.lang.String)"><CODE>setForward(String)</CODE></A>, <A HREF="../../../org/apache/click/Page.html#setPath(java.lang.String)"><CODE>setPath(String)</CODE></A> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>location</CODE> - the path to redirect the request to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRedirect(java.lang.Class)"><!-- --></A><H3> | |
setRedirect</H3> | |
<PRE> | |
public void <B>setRedirect</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><? extends <A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>> pageClass)</PRE> | |
<DL> | |
<DD>Set the request to redirect to the give page class. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>pageClass</CODE> - the class of the Page to redirect the request to | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the Page Class is not configured | |
with a unique path<DT><B>See Also:</B><DD><A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.String)"><CODE>setRedirect(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRedirect(java.lang.String, java.util.Map)"><!-- --></A><H3> | |
setRedirect</H3> | |
<PRE> | |
public void <B>setRedirect</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> location, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?> params)</PRE> | |
<DL> | |
<DD>Set the request to redirect to the given <code>location</code> and append | |
the map of request parameters to the location URL. | |
<p/> | |
The map keys will be used as the request parameter names and the map | |
values will be used as the request parameter values. For example: | |
<pre class="prettyprint"> | |
public boolean onSave() { | |
// Specify redirect parameters | |
Map parameters = new HashMap(); | |
parameters.put("customerId", getCustomerId()); | |
// Set redirect to customer.htm page | |
setRedirect("/customer.htm", parameters); | |
return false; | |
} </pre> | |
To render multiple parameter values for the same parameter name, specify | |
the values as a String[] array. For example: | |
<pre class="prettyprint"> | |
public boolean onSave() { | |
// Specify an array of customer IDs | |
String[] ids = {"123", "456", "789"}; | |
// Specify redirect parameters | |
Map parameters = new HashMap(); | |
parameters.put("customerIds", ids); | |
// Set redirect to customer.htm page | |
setRedirect("/customer.htm", parameters); | |
return false; | |
} </pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>location</CODE> - the path to redirect the request to<DD><CODE>params</CODE> - the map of request parameter name and value pairs<DT><B>See Also:</B><DD><A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.String)"><CODE>setRedirect(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRedirect(java.lang.Class, java.util.Map)"><!-- --></A><H3> | |
setRedirect</H3> | |
<PRE> | |
public void <B>setRedirect</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><? extends <A HREF="../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>> pageClass, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?> params)</PRE> | |
<DL> | |
<DD>Set the request to redirect to the given page class and and append | |
the map of request parameters to the page URL. | |
<p/> | |
The map keys will be used as the request parameter names and the map | |
values will be used as the request parameter values. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>pageClass</CODE> - the class of the Page to redirect the request to<DD><CODE>params</CODE> - the map of request parameter name and value pairs | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the Page Class is not configured | |
with a unique path<DT><B>See Also:</B><DD><A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.String, java.util.Map)"><CODE>setRedirect(java.lang.String, java.util.Map)</CODE></A>, | |
<A HREF="../../../org/apache/click/Page.html#setRedirect(java.lang.String)"><CODE>setRedirect(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTemplate()"><!-- --></A><H3> | |
getTemplate</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getTemplate</B>()</PRE> | |
<DL> | |
<DD>Return the path of the page border template to render, by default this | |
method returns <A HREF="../../../org/apache/click/Page.html#getPath()"><CODE>getPath()</CODE></A>. | |
<p/> | |
Pages can override this method to return an alternative border page | |
template. This is very useful when implementing an standardized look and | |
feel for a web site. The example below provides a BorderedPage base Page | |
which other site templated Pages should extend. | |
<pre class="codeJava"> | |
<span class="kw">public class</span> BorderedPage <span class="kw">extends</span> Page { | |
<span class="kw">public</span> String getTemplate() { | |
<span class="kw">return</span> <span class="st">"border.htm"</span>; | |
} | |
} </pre> | |
The BorderedPage returns the page border template <span class="st">"border.htm"</span>: | |
<pre class="codeHtml"> | |
<html> | |
<head> | |
<title> <span class="blue">$title</span> </title> | |
<link rel="stylesheet" type="text/css" href="style.css" title="Style"/> | |
</head> | |
<body> | |
<h1> <span class="blue">$title</span> </h1> | |
<hr/> | |
<span class="red">#parse</span>( <span class="blue">$path</span> ) | |
</body> | |
</html> </pre> | |
Other pages insert their content into this template, via their | |
<A HREF="../../../org/apache/click/Page.html#path"><CODE>path</CODE></A> property using the Velocity | |
<a href="../../../../velocity/vtl-reference-guide.html#parse">#parse</a> | |
directive. Note the <span class="blue">$path</span> value is automatically | |
added to the VelocityContext by the ClickServlet. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the path of the page template to render, by default returns | |
<A HREF="../../../org/apache/click/Page.html#getPath()"><CODE>getPath()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTemplate(java.lang.String)"><!-- --></A><H3> | |
setTemplate</H3> | |
<PRE> | |
public void <B>setTemplate</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> template)</PRE> | |
<DL> | |
<DD>Set the page border template path. | |
<p/> | |
<b>Note:</b> if this value is not set, <A HREF="../../../org/apache/click/Page.html#getTemplate()"><CODE>getTemplate()</CODE></A> will default | |
to <A HREF="../../../org/apache/click/Page.html#getPath()"><CODE>getPath()</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>template</CODE> - the border template path</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/click/ControlRegistry.html" title="class in org.apache.click"><B>PREV CLASS</B></A> | |
<A HREF="../../../org/apache/click/PageInterceptor.html" title="interface in org.apache.click"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../index.html?org/apache/click/Page.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="Page.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: NESTED | <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> | |
<style type='text/css'>.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;}.typ{color:#000;}.lit{color:#066;}.pun{color:#660;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}.dec{color:#606;}pre.prettyprint{padding:1em;border:1px solid #888;overflow:auto;}@media print{.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;font-style:italic;}.typ{color:#000;font-weight:bold;}.lit{color:#044;}.pun{color:#440;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}}</style><script type='text/javascript'>var PR_keywords={};(function(){var CPP_KEYWORDS='abstract bool break case catch char class const '+'const_cast continue default delete deprecated dllexport dllimport do '+'double dynamic_cast else enum explicit extern false float for friend '+'goto if inline int long mutable naked namespace new noinline noreturn '+'nothrow novtable operator private property protected public register '+'reinterpret_cast return selectany short signed sizeof static '+'static_cast struct switch template this thread throw true try typedef '+'typeid typename union unsigned using declaration, directive uuid '+'virtual void volatile while typeof';var CSHARP_KEYWORDS='as base by byte checked decimal delegate descending '+'event finally fixed foreach from group implicit in interface internal '+'into is lock null object override orderby params readonly ref sbyte '+'sealed stackalloc string select uint ulong unchecked unsafe ushort var';var JAVA_KEYWORDS='package synchronized boolean implements import throws '+'instanceof transient extends final strictfp native super';var JSCRIPT_KEYWORDS='debugger export function with NaN Infinity';var PERL_KEYWORDS='require sub unless until use elsif BEGIN END';var PYTHON_KEYWORDS='and assert def del elif except exec global lambda '+'not or pass print raise yield False True None';var RUBY_KEYWORDS='then end begin rescue ensure module when undef next '+'redo retry alias defined';var SH_KEYWORDS='done fi';var KEYWORDS=[CPP_KEYWORDS,CSHARP_KEYWORDS,JAVA_KEYWORDS,JSCRIPT_KEYWORDS,PERL_KEYWORDS,PYTHON_KEYWORDS,RUBY_KEYWORDS,SH_KEYWORDS];for(var k=0;k<KEYWORDS.length;k++){var kw=KEYWORDS[k].split(' ');for(var i=0;i<kw.length;i++){if(kw[i]){PR_keywords[kw[i]]=true;}}}}).call(this);var PR_STRING='str';var PR_KEYWORD='kwd';var PR_COMMENT='com';var PR_TYPE='typ';var PR_LITERAL='lit';var PR_PUNCTUATION='pun';var PR_PLAIN='pln';var PR_TAG='tag';var PR_DECLARATION='dec';var PR_SOURCE='src';var PR_ATTRIB_NAME='atn';var PR_ATTRIB_VALUE='atv';var PR_TAB_WIDTH=8;function PR_isWordChar(ch){return(ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z');}function PR_spliceArrayInto(inserted,container,containerPosition,countReplaced){inserted.unshift(containerPosition,countReplaced||0);try{container.splice.apply(container,inserted);}finally{inserted.splice(0,2);}}var REGEXP_PRECEDER_PATTERN=(function(){var preceders=['!','!=','!==','#','%','%=','&','&&','&&=','&=','(','*','*=','+=',',','-=','->','/','/=',':','::',';','<','<<','<<=','<=','=','==','===','>','>=','>>','>>=','>>>','>>>=','?','@','[','^','^=','^^','^^=','{','|','|=','||','||=','~','break','case','continue','delete','do','else','finally','instanceof','return','throw','try','typeof'];var pattern='(?:'+'(?:(?:^|[^0-9\.])\\.{1,3})|'+'(?:(?:^|[^\\+])\\+)|'+'(?:(?:^|[^\\-])-)';for(var i=0;i<preceders.length;++i){var preceder=preceders[i];if(PR_isWordChar(preceder.charAt(0))){pattern+='|\\b'+preceder;}else{pattern+='|'+preceder.replace(/([^=<>:&])/g,'\\$1');}}pattern+='|^)\\s*$';return new RegExp(pattern);})();var pr_amp=/&/g;var pr_lt=/</g;var pr_gt=/>/g;var pr_quot=/"/g;function PR_attribToHtml(str){return str.replace(pr_amp,'&').replace(pr_lt,'<').replace(pr_gt,'>').replace(pr_quot,'"');}function PR_textToHtml(str){return str.replace(pr_amp,'&').replace(pr_lt,'<').replace(pr_gt,'>');}var pr_ltEnt=/</g;var pr_gtEnt=/>/g;var pr_aposEnt=/'/g;var pr_quotEnt=/"/g;var pr_ampEnt=/&/g;function PR_htmlToText(html){var pos=html.indexOf('&');if(pos<0){return html;}for(--pos;(pos=html.indexOf('&#',pos+1))>=0;){var end=html.indexOf(';',pos);if(end>=0){var num=html.substring(pos+3,end);var radix=10;if(num&&num.charAt(0)=='x'){num=num.substring(1);radix=16;}var codePoint=parseInt(num,radix);if(!isNaN(codePoint)){html=(html.substring(0,pos)+String.fromCharCode(codePoint)+html.substring(end+1));}}}return html.replace(pr_ltEnt,'<').replace(pr_gtEnt,'>').replace(pr_aposEnt,"'").replace(pr_quotEnt,'"').replace(pr_ampEnt,'&');}function PR_isRawContent(node){return'XMP'==node.tagName;}var PR_innerHtmlWorks=null;function PR_getInnerHtml(node){if(null===PR_innerHtmlWorks){var testNode=document.createElement('PRE');testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));PR_innerHtmlWorks=!/</.test(testNode.innerHTML);}if(PR_innerHtmlWorks){var content=node.innerHTML;if(PR_isRawContent(node)){content=PR_textToHtml(content);}return content;}var out=[];for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}return out.join('');}function PR_normalizedHtml(node,out){switch(node.nodeType){case 1:var name=node.tagName.toLowerCase();out.push('\074',name);for(var i=0;i<node.attributes.length;++i){var attr=node.attributes[i];if(!attr.specified){continue;}out.push(' ');PR_normalizedHtml(attr,out);}out.push('>');for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}if(node.firstChild||!/^(?:br|link|img)$/.test(name)){out.push('<\/',name,'>');}break;case 2:out.push(node.name.toLowerCase(),'="',PR_attribToHtml(node.value),'"');break;case 3:case 4:out.push(PR_textToHtml(node.nodeValue));break;}}function PR_tabExpander(tabWidth){var SPACES=' ';var charInLine=0;return function(plainText){var out=null;var pos=0;for(var i=0,n=plainText.length;i<n;++i){var ch=plainText.charAt(i);switch(ch){case'\t':if(!out){out=[];}out.push(plainText.substring(pos,i));var nSpaces=tabWidth-(charInLine%tabWidth);charInLine+=nSpaces;for(;nSpaces>=0;nSpaces-=SPACES.length){out.push(SPACES.substring(0,nSpaces));}pos=i+1;break;case'\n':charInLine=0;break;default:++charInLine;}}if(!out){return plainText;}out.push(plainText.substring(pos));return out.join('');};}var pr_chunkPattern=/(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g;var pr_commentPrefix=/^<!--/;var pr_cdataPrefix=/^<\[CDATA\[/;var pr_brPrefix=/^<br\b/i;function PR_extractTags(s){var matches=s.match(pr_chunkPattern);var sourceBuf=[];var sourceBufLen=0;var extractedTags=[];if(matches){for(var i=0,n=matches.length;i<n;++i){var match=matches[i];if(match.length>1&&match.charAt(0)==='<'){if(pr_commentPrefix.test(match)){continue;}if(pr_cdataPrefix.test(match)){sourceBuf.push(match.substring(9,match.length-3));sourceBufLen+=match.length-12;}else if(pr_brPrefix.test(match)){sourceBuf.push('\n');sourceBufLen+=1;}else{extractedTags.push(sourceBufLen,match);}}else{var literalText=PR_htmlToText(match);sourceBuf.push(literalText);sourceBufLen+=literalText.length;}}}return{source:sourceBuf.join(''),tags:extractedTags};}function PR_createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns){var shortcuts={};(function(){var allPatterns=shortcutStylePatterns.concat(fallthroughStylePatterns);for(var i=allPatterns.length;--i>=0;){var patternParts=allPatterns[i];var shortcutChars=patternParts[3];if(shortcutChars){for(var c=shortcutChars.length;--c>=0;){shortcuts[shortcutChars.charAt(c)]=patternParts;}}}})();var nPatterns=fallthroughStylePatterns.length;return function(sourceCode,opt_basePos){opt_basePos=opt_basePos||0;var decorations=[opt_basePos,PR_PLAIN];var lastToken='';var pos=0;var tail=sourceCode;while(tail.length){var style;var token=null;var patternParts=shortcuts[tail.charAt(0)];if(patternParts){var match=tail.match(patternParts[1]);token=match[0];style=patternParts[0];}else{for(var i=0;i<nPatterns;++i){patternParts=fallthroughStylePatterns[i];var contextPattern=patternParts[2];if(contextPattern&&!contextPattern.test(lastToken)){continue;}var match=tail.match(patternParts[1]);if(match){token=match[0];style=patternParts[0];break;}}if(!token){style=PR_PLAIN;token=tail.substring(0,1);}}decorations.push(opt_basePos+pos,style);pos+=token.length;tail=tail.substring(token.length);if(style!==PR_COMMENT&&/\S/.test(token)){lastToken=token;}}return decorations;};}var PR_C_STYLE_STRING_AND_COMMENT_LEXER=PR_createSimpleLexer([[PR_STRING,/^\'(?:[^\\\']|\\[\s\S])*(?:\'|$)/,null,"'"],[PR_STRING,/^"(?:[^\\"]|\\[\s\S])*(?:"|$)/,null,'"'],[PR_STRING,/^\`(?:[^\\\`]|\\[\s\S])*(?:\`|$)/,null,'`']],[[PR_PLAIN,/^(?:[^\'"\`\/\#]+)/,null,' \r\n'],[PR_COMMENT,/^#[^\r\n]*/,null,'#'],[PR_COMMENT,/^\/\/[^\r\n]*/,null],[PR_STRING,/^\/(?:[^\\\*\/]|\\[\s\S])+(?:\/|$)/,REGEXP_PRECEDER_PATTERN],[PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/,null]]);function PR_splitStringAndCommentTokens(sourceCode){return PR_C_STYLE_STRING_AND_COMMENT_LEXER(sourceCode);}var PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER=PR_createSimpleLexer([],[[PR_PLAIN,/^\s+/,null,' \r\n'],[PR_PLAIN,/^[a-z_$@][a-z_$@0-9]*/i,null],[PR_LITERAL,/^0x[a-f0-9]+[a-z]/i,null],[PR_LITERAL,/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?[a-z]*/i,null,'123456789'],[PR_PUNCTUATION,/^[^\s\w\.$@]+/,null]]);function PR_splitNonStringNonCommentTokens(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_PLAIN){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecs=PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER(chunk,start);for(var j=0,m=subDecs.length;j<m;j+=2){var subStyle=subDecs[j+1];if(subStyle===PR_PLAIN){var subStart=subDecs[j];var subEnd=j+2<m?subDecs[j+2]:chunk.length;var token=source.substring(subStart,subEnd);if(token=='.'){subDecs[j+1]=PR_PUNCTUATION;}else if(token in PR_keywords){subDecs[j+1]=PR_KEYWORD;}else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)){subDecs[j+1]=token.charAt(0)=='@'?PR_LITERAL:PR_TYPE;}}}PR_spliceArrayInto(subDecs,decorations,i,2);i+=subDecs.length-2;}}return decorations;}var PR_MARKUP_LEXER=PR_createSimpleLexer([],[[PR_PLAIN,/^[^<]+/,null],[PR_DECLARATION,/^<!\w[^>]*(?:>|$)/,null],[PR_COMMENT,/^<!--[\s\S]*?(?:-->|$)/,null],[PR_SOURCE,/^<\?[\s\S]*?(?:\?>|$)/,null],[PR_SOURCE,/^<%[\s\S]*?(?:%>|$)/,null],[PR_SOURCE,/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],[PR_TAG,/^<\/?\w[^<>]*>/,null]]);var PR_SOURCE_CHUNK_PARTS=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function PR_tokenizeMarkup(source){var decorations=PR_MARKUP_LEXER(source);for(var i=0;i<decorations.length;i+=2){if(decorations[i+1]===PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var sourceChunk=source.substring(start,end);var match=(sourceChunk.match(PR_SOURCE_CHUNK_PARTS));if(match){decorations.splice(i,2,start,PR_TAG,start+match[1].length,PR_SOURCE,start+match[1].length+(match[2]||'').length,PR_TAG);}}}return decorations;}var PR_TAG_LEXER=PR_createSimpleLexer([[PR_ATTRIB_VALUE,/^\'[^\']*(?:\'|$)/,null,"'"],[PR_ATTRIB_VALUE,/^"[^"]*(?:"|$)/,null,'"'],[PR_PUNCTUATION,/^[<>\/=]+/,null,'<>/=']],[[PR_TAG,/^[\w-]+/,/^</],[PR_ATTRIB_VALUE,/^[\w-]+/,/^=/],[PR_ATTRIB_NAME,/^[\w-]+/,null],[PR_PLAIN,/^\s+/,null,' \r\n']]);function PR_splitTagAttributes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_TAG){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecorations=PR_TAG_LEXER(chunk,start);PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceNodes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style==PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var subDecorations=PR_decorateSource(source.substring(start,end));for(var j=0,m=subDecorations.length;j<m;j+=2){subDecorations[j]+=start;}PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceAttributes(source,decorations){var nextValueIsSource=false;for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_ATTRIB_NAME){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;nextValueIsSource=/^on|^style$/i.test(source.substring(start,end));}else if(style==PR_ATTRIB_VALUE){if(nextValueIsSource){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var attribValue=source.substring(start,end);var attribLen=attribValue.length;var quoted=(attribLen>=2&&/^["\']/.test(attribValue)&&attribValue.charAt(0)===attribValue.charAt(attribLen-1));var attribSource;var attribSourceStart;var attribSourceEnd;if(quoted){attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue;}else{attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue.substring(1,attribValue.length-1);}var attribSourceDecorations=PR_decorateSource(attribSource);for(var j=0,m=attribSourceDecorations.length;j<m;j+=2){attribSourceDecorations[j]+=attribSourceStart;}if(quoted){attribSourceDecorations.push(attribSourceEnd,PR_ATTRIB_VALUE);PR_spliceArrayInto(attribSourceDecorations,decorations,i+2,0);}else{PR_spliceArrayInto(attribSourceDecorations,decorations,i,2);}}nextValueIsSource=false;}}return decorations;}function PR_decorateSource(sourceCode){var decorations=PR_splitStringAndCommentTokens(sourceCode);decorations=PR_splitNonStringNonCommentTokens(sourceCode,decorations);return decorations;}function PR_decorateMarkup(sourceCode){var decorations=PR_tokenizeMarkup(sourceCode);decorations=PR_splitTagAttributes(sourceCode,decorations);decorations=PR_splitSourceNodes(sourceCode,decorations);decorations=PR_splitSourceAttributes(sourceCode,decorations);return decorations;}function PR_recombineTagsAndDecorations(sourceText,extractedTags,decorations){var html=[];var outputIdx=0;var openDecoration=null;var currentDecoration=null;var tagPos=0;var decPos=0;var tabExpander=PR_tabExpander(PR_TAB_WIDTH);function emitTextUpTo(sourceIdx){if(sourceIdx>outputIdx){if(openDecoration&&openDecoration!==currentDecoration){html.push('</span>');openDecoration=null;}if(!openDecoration&¤tDecoration){openDecoration=currentDecoration;html.push('<span class="',openDecoration,'">');}var htmlChunk=PR_textToHtml(tabExpander(sourceText.substring(outputIdx,sourceIdx))).replace(/(\r\n?|\n| ) /g,'$1 ').replace(/\r\n?|\n/g,' <br>');html.push(htmlChunk);outputIdx=sourceIdx;}}while(true){var outputTag;if(tagPos<extractedTags.length){if(decPos<decorations.length){outputTag=extractedTags[tagPos]<=decorations[decPos];}else{outputTag=true;}}else{outputTag=false;}if(outputTag){emitTextUpTo(extractedTags[tagPos]);if(openDecoration){html.push('</span>');openDecoration=null;}html.push(extractedTags[tagPos+1]);tagPos+=2;}else if(decPos<decorations.length){emitTextUpTo(decorations[decPos]);currentDecoration=decorations[decPos+1];decPos+=2;}else{break;}}emitTextUpTo(sourceText.length);if(openDecoration){html.push('</span>');}return html.join('');}function prettyPrintOne(sourceCodeHtml){try{var sourceAndExtractedTags=PR_extractTags(sourceCodeHtml);var source=sourceAndExtractedTags.source;var extractedTags=sourceAndExtractedTags.tags;var isMarkup=/^\s*</.test(source)&&/>\s*$/.test(source);var decorations=isMarkup?PR_decorateMarkup(source):PR_decorateSource(source);return PR_recombineTagsAndDecorations(source,extractedTags,decorations);}catch(e){if('console'in window){console.log(e);console.trace();}return sourceCodeHtml;}}var PR_SHOULD_USE_CONTINUATION=true;function prettyPrint(opt_whenDone){var codeSegments=[document.getElementsByTagName('pre'),document.getElementsByTagName('code'),document.getElementsByTagName('xmp')];var elements=[];for(var i=0;i<codeSegments.length;++i){for(var j=0;j<codeSegments[i].length;++j){elements.push(codeSegments[i][j]);}}codeSegments=null;var k=0;function doWork(){var endTime=(PR_SHOULD_USE_CONTINUATION?new Date().getTime()+250:Infinity);for(;k<elements.length&&new Date().getTime()<endTime;k++){var cs=elements[k];if(cs.className&&cs.className.indexOf('prettyprint')>=0){var nested=false;for(var p=cs.parentNode;p!=null;p=p.parentNode){if((p.tagName=='pre'||p.tagName=='code'||p.tagName=='xmp')&&p.className&&p.className.indexOf('prettyprint')>=0){nested=true;break;}}if(!nested){var content=PR_getInnerHtml(cs);content=content.replace(/(?:\r\n?|\n)$/,'');var newContent=prettyPrintOne(content);if(!PR_isRawContent(cs)){cs.innerHTML=newContent;}else{var pre=document.createElement('PRE');for(var i=0;i<cs.attributes.length;++i){var a=cs.attributes[i];if(a.specified){pre.setAttribute(a.name,a.value);}}pre.innerHTML=newContent;cs.parentNode.replaceChild(pre,cs);}}}}if(k<elements.length){setTimeout(doWork,250);}else if(opt_whenDone){opt_whenDone();}}doWork();}</script><script type='text/javascript'>prettyPrint();</script></BODY> | |
</HTML> |