blob: c5fffce0151295b986ab9812f92a3b89f2b47f24 [file] [log] [blame]
<!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:04 PKT 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
ActionResult (Click Framework API - v2.3.0)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.click.ActionResult class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="ActionResult (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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/click/ActionListener.html" title="interface in org.apache.click"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/click/Behavior.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/ActionResult.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ActionResult.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 ActionResult</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.ActionResult</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>ActionResult</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></DL>
</PRE>
<P>
Provides an ActionResult that is returned by Page Actions and AjaxBehaviors.
ActionResults are often used to return a partial response to the browser
instead of the full page content.
<p/>
An ActionResult can consist of a String (HTML, JSON, XML, plain text) or a byte
array (jpg, gif, png, pdf or excel documents). The ActionResult <A HREF="../../../org/apache/click/ActionResult.html#contentType"><CODE>contentType</CODE></A>
must be set appropriately in order for the browser to recognize the action result.
<p/>
ActionResults are returned by <A HREF="../../../org/apache/click/ajax/AjaxBehavior.html" title="interface in org.apache.click.ajax"><CODE>Ajax Behaviors</CODE></A>
and <tt>Page Action</tt> methods.
<h3>Ajax Behavior</h3>
Ajax requests are handled by adding an <A HREF="../../../org/apache/click/ajax/AjaxBehavior.html" title="interface in org.apache.click.ajax"><CODE>Ajax Behavior</CODE></A>
to a control. The AjaxBehavior <A HREF="../../../org/apache/click/ajax/AjaxBehavior.html#onAction(org.apache.click.Control)"><CODE>onAction</CODE></A>
method will handle the request and return a ActionResult instance that contains
the response, thus bypassing the rendering of the Page template. For example:
<pre class="prettyprint">
private ActionLink link = new ActionLink("link");
public void onInit() {
addControl(link);
link.addBehavior(new AjaxBehavior() {
// The onAction method must return a ActionResult
public ActionResult onAction(Control source) {
// Create a new action result containing an HTML snippet and HTML content type
ActionResult actionResult = new ActionResult("&lt;span&gt;Hello World&lt;/span&gt;", ActionResult.HTML);
return actionResult;
}
});
} </pre>
<h3>Page Action</h3>
A <tt>Page Action</tt> is a method on a Page that can be invoked directly
from the browser. The Page Action method returns an ActionResult instance that
is rendered to the browser, thus bypassing the rendering of the Page template.
<pre class="prettyprint">
private ActionLink link = new ActionLink("link");
public void onInit() {
link.addControl(link);
// A "pageAction" is set as a parameter on the link. The "pageAction"
// value is set to the Page method: "renderHelloWorld"
link.setParameter(PAGE_ACTION, "renderHelloWorld");
}
&#47;**
* This is a "pageAction" method that will render an HTML response.
*
* Note the signature of the pageAction: a public, no-argument method
* returning a ActionResult instance.
*&#47;
public ActionResult renderHelloWorld() {
ActionResult actionResult = new ActionResult("&lt;span&gt;Hello World&lt;/span&gt;", ActionResult.HTML);
return actionResult;
} </pre>
<h3>Content Type</h3>
The <A HREF="../../../org/apache/click/ActionResult.html#contentType"><CODE>contentType</CODE></A> of the ActionResult must be set to the appropriate type
in order for the client to recognize the response. ActionResult provides constants
for some of the common <tt>content types</tt>, including: <A HREF="../../../org/apache/click/ActionResult.html#XML"><CODE>text/xml</CODE></A>,
<A HREF="../../../org/apache/click/ActionResult.html#HTML"><CODE>text/html</CODE></A>, <A HREF="../../../org/apache/click/ActionResult.html#JSON"><CODE>application/json</CODE></A>, <A HREF="../../../org/apache/click/ActionResult.html#TEXT"><CODE>text/plain</CODE></A>.
<p/>
For example:
<pre class="prettyprint">
ActionResult actionResult = new ActionResult("alert('hello world');", ActionResult.JAVASCRIPT);
...
// content type can also be set through the setContentType method
actionResult.setContentType(ActionResult.JAVASCRIPT);
...
</pre>
More content types can be retrieved through <A HREF="../../../org/apache/click/util/ClickUtils.html#getMimeType(java.lang.String)"><CODE>ClickUtils.getMimeType(java.lang.String)</CODE></A>:
<pre class="prettyprint">
// lookup content type for PNG
String contentType = ClickUtils.getMimeType("png");
actionResult.setContentType(contentType); </pre>
<P>
<P>
<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>static&nbsp;<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/ActionResult.html#HTML">HTML</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The html content type constant: <tt>text/html</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<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/ActionResult.html#JAVASCRIPT">JAVASCRIPT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The javascript content type constant: <tt>text/javascript</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<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/ActionResult.html#JSON">JSON</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The json content type constant: <tt>text/json</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<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/ActionResult.html#TEXT">TEXT</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The plain text content type constant: <tt>text/plain</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<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/ActionResult.html#XHTML">XHTML</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The The xhtml content type constant: <tt>application/xhtml+xml</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<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/ActionResult.html#XML">XML</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The xml content type constant: <tt>text/xml</tt>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== 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/ActionResult.html#ActionResult()">ActionResult</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new empty ActionResult.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#ActionResult(byte[], java.lang.String)">ActionResult</A></B>(byte[]&nbsp;bytes,
<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>&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct the ActionResult for the given byte array and content type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#ActionResult(java.io.InputStream, java.lang.String)">ActionResult</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;inputStream,
<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>&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct the ActionResult for the given inputStream and content type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#ActionResult(java.io.Reader, java.lang.String)">ActionResult</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A>&nbsp;reader,
<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>&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct the ActionResult for the given reader and content type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#ActionResult(java.lang.String)">ActionResult</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>&nbsp;content)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct the ActionResult for the given content.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#ActionResult(java.lang.String, java.util.Map, java.lang.String)">ActionResult</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>&nbsp;template,
<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>&lt;<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>&gt;&nbsp;model,
<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>&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct the ActionResult for the given template and model.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#ActionResult(java.lang.String, java.lang.String)">ActionResult</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>&nbsp;content,
<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>&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct the ActionResult for the given String content and content type.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#getBytes()">getBytes</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the byte array to stream back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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/ActionResult.html#getCharacterEncoding()">getCharacterEncoding</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the action result character encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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/ActionResult.html#getContent()">getContent</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the content String to stream back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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/ActionResult.html#getContentType()">getContentType</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the action result content type, default is <A HREF="../../../org/apache/click/ActionResult.html#TEXT">"text/plain"</A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#getInputStream()">getInputStream</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the inputStream to stream back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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>&lt;<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>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#getModel()">getModel</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the data model for the ActionResult <A HREF="../../../org/apache/click/ActionResult.html#template"><CODE>template</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#getReader()">getReader</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the reader which characters are streamed back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<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/ActionResult.html#getTemplate()">getTemplate</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the template to render for this ActionResult.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#isCacheActionRestul()">isCacheActionRestul</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return true if the action result should be cached by the client browser,
defaults to false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#render(org.apache.click.Context)">render</A></B>(<A HREF="../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A>&nbsp;context)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Render the ActionResult to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#renderActionResult(org.apache.click.Context)">renderActionResult</A></B>(<A HREF="../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A>&nbsp;context)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Render the ActionResult to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setBytes(byte[], java.lang.String)">setBytes</A></B>(byte[]&nbsp;bytes,
<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>&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the byte array to stream back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setCacheActionResult(boolean)">setCacheActionResult</A></B>(boolean&nbsp;cacheActionResult)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set whether the action result should be cached by the client browser or
not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setCharacterEncoding(java.lang.String)">setCharacterEncoding</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>&nbsp;characterEncoding)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the action result character encoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setContent(java.lang.String)">setContent</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>&nbsp;content)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the content String to stream back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setContentType(java.lang.String)">setContentType</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>&nbsp;contentType)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the action result response content type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setInputStream(java.io.InputStream)">setInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;inputStream)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the content to stream back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setModel(java.util.Map)">setModel</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>&lt;<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>&gt;&nbsp;model)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the model of the ActionResult template to render.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.html#setReader(java.io.Reader)">setReader</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A>&nbsp;reader)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the reader which characters are streamed back to the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/click/ActionResult.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>&nbsp;template)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the template to render for this ActionResult.</TD>
</TR>
</TABLE>
&nbsp;<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>
&nbsp;
<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="TEXT"><!-- --></A><H3>
TEXT</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>TEXT</B></PRE>
<DL>
<DD>The plain text content type constant: <tt>text/plain</tt>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.ActionResult.TEXT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="HTML"><!-- --></A><H3>
HTML</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>HTML</B></PRE>
<DL>
<DD>The html content type constant: <tt>text/html</tt>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.ActionResult.HTML">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="XHTML"><!-- --></A><H3>
XHTML</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>XHTML</B></PRE>
<DL>
<DD>The The xhtml content type constant: <tt>application/xhtml+xml</tt>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.ActionResult.XHTML">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="JSON"><!-- --></A><H3>
JSON</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>JSON</B></PRE>
<DL>
<DD>The json content type constant: <tt>text/json</tt>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.ActionResult.JSON">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="JAVASCRIPT"><!-- --></A><H3>
JAVASCRIPT</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>JAVASCRIPT</B></PRE>
<DL>
<DD>The javascript content type constant: <tt>text/javascript</tt>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.ActionResult.JAVASCRIPT">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="XML"><!-- --></A><H3>
XML</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>XML</B></PRE>
<DL>
<DD>The xml content type constant: <tt>text/xml</tt>.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.apache.click.ActionResult.XML">Constant Field Values</A></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="ActionResult(java.lang.String, java.util.Map, java.lang.String)"><!-- --></A><H3>
ActionResult</H3>
<PRE>
public <B>ActionResult</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>&nbsp;template,
<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>&lt;<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>&gt;&nbsp;model,
<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>&nbsp;contentType)</PRE>
<DL>
<DD>Construct the ActionResult for the given template and model.
<p/>
When the ActionResult is rendered the template and model will be merged and
the result will be streamed back to the client.
<p/>
For example:
<pre class="prettyprint">
public class MyPage extends Page {
public void onInit() {
Behavior behavior = new DefaultAjaxBehavior() {
public ActionResult onAction() {
Map model = new HashMap();
model.put("id", "link");
// Note: we set XML as the content type
ActionResult actionResult = new ActionResult("/js/actionResult.xml", model, ActionResult.XML);
return actionResult;
}
}
}
} </pre>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>template</CODE> - the template to render and stream back to the client<DD><CODE>model</CODE> - the template data model<DD><CODE>contentType</CODE> - the response content type</DL>
</DL>
<HR>
<A NAME="ActionResult(java.io.Reader, java.lang.String)"><!-- --></A><H3>
ActionResult</H3>
<PRE>
public <B>ActionResult</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A>&nbsp;reader,
<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>&nbsp;contentType)</PRE>
<DL>
<DD>Construct the ActionResult for the given reader and content type.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader which characters must be streamed back to the
client<DD><CODE>contentType</CODE> - the response content type</DL>
</DL>
<HR>
<A NAME="ActionResult(java.io.InputStream, java.lang.String)"><!-- --></A><H3>
ActionResult</H3>
<PRE>
public <B>ActionResult</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;inputStream,
<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>&nbsp;contentType)</PRE>
<DL>
<DD>Construct the ActionResult for the given inputStream and content type.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>inputStream</CODE> - the input stream to stream back to the client<DD><CODE>contentType</CODE> - the response content type</DL>
</DL>
<HR>
<A NAME="ActionResult(java.lang.String, java.lang.String)"><!-- --></A><H3>
ActionResult</H3>
<PRE>
public <B>ActionResult</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>&nbsp;content,
<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>&nbsp;contentType)</PRE>
<DL>
<DD>Construct the ActionResult for the given String content and content type.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>content</CODE> - the String content to stream back to the client<DD><CODE>contentType</CODE> - the response content type</DL>
</DL>
<HR>
<A NAME="ActionResult(byte[], java.lang.String)"><!-- --></A><H3>
ActionResult</H3>
<PRE>
public <B>ActionResult</B>(byte[]&nbsp;bytes,
<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>&nbsp;contentType)</PRE>
<DL>
<DD>Construct the ActionResult for the given byte array and content type.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the byte array to stream back to the client<DD><CODE>contentType</CODE> - the response content type</DL>
</DL>
<HR>
<A NAME="ActionResult(java.lang.String)"><!-- --></A><H3>
ActionResult</H3>
<PRE>
public <B>ActionResult</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>&nbsp;content)</PRE>
<DL>
<DD>Construct the ActionResult for the given content. The
<tt><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletResponse.html#setContentType(java.lang.String)" title="class or interface in javax.servlet"><CODE>response content type</CODE></A></tt>
will default to <A HREF="../../../org/apache/click/ActionResult.html#TEXT"><CODE>TEXT</CODE></A>, unless overridden.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>content</CODE> - the content to stream back to the client</DL>
</DL>
<HR>
<A NAME="ActionResult()"><!-- --></A><H3>
ActionResult</H3>
<PRE>
public <B>ActionResult</B>()</PRE>
<DL>
<DD>Construct a new empty ActionResult. The
<tt><A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletResponse.html#setContentType(java.lang.String)" title="class or interface in javax.servlet"><CODE>response content type</CODE></A></tt>
will default to <A HREF="../../../org/apache/click/ActionResult.html#TEXT"><CODE>TEXT</CODE></A>, unless overridden.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setCacheActionResult(boolean)"><!-- --></A><H3>
setCacheActionResult</H3>
<PRE>
public void <B>setCacheActionResult</B>(boolean&nbsp;cacheActionResult)</PRE>
<DL>
<DD>Set whether the action result should be cached by the client browser or
not.
<p/>
If false, Click will set the following headers to prevent browsers
from caching the result:
<pre class="prettyprint">
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
response.setDateHeader("Expires", new Date(1L).getTime()); </pre>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cacheActionResult</CODE> - indicates whether the action result should be cached
by the client browser or not</DL>
</DD>
</DL>
<HR>
<A NAME="isCacheActionRestul()"><!-- --></A><H3>
isCacheActionRestul</H3>
<PRE>
public boolean <B>isCacheActionRestul</B>()</PRE>
<DL>
<DD>Return true if the action result should be cached by the client browser,
defaults to false. It is highly unlikely that you would turn action result
caching on.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if the action result should be cached by the client browser,
false otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="getCharacterEncoding()"><!-- --></A><H3>
getCharacterEncoding</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>getCharacterEncoding</B>()</PRE>
<DL>
<DD>Return the action result character encoding. If no character encoding is specified
the request character encoding will be used.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the action result character encoding</DL>
</DD>
</DL>
<HR>
<A NAME="setCharacterEncoding(java.lang.String)"><!-- --></A><H3>
setCharacterEncoding</H3>
<PRE>
public void <B>setCharacterEncoding</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>&nbsp;characterEncoding)</PRE>
<DL>
<DD>Set the action result character encoding. If no character encoding is set the
request character encoding will be used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>characterEncoding</CODE> - the action result character encoding</DL>
</DD>
</DL>
<HR>
<A NAME="setContentType(java.lang.String)"><!-- --></A><H3>
setContentType</H3>
<PRE>
public void <B>setContentType</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>&nbsp;contentType)</PRE>
<DL>
<DD>Set the action result response content type. If no content type is set it will
default to <A HREF="../../../org/apache/click/ActionResult.html#TEXT">"text/plain"</A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>contentType</CODE> - the action result response content type</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 action result content type, default is <A HREF="../../../org/apache/click/ActionResult.html#TEXT">"text/plain"</A>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the response content type</DL>
</DD>
</DL>
<HR>
<A NAME="setContent(java.lang.String)"><!-- --></A><H3>
setContent</H3>
<PRE>
public void <B>setContent</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>&nbsp;content)</PRE>
<DL>
<DD>Set the content String to stream back to the client.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>content</CODE> - the content String to stream back to the client</DL>
</DD>
</DL>
<HR>
<A NAME="getContent()"><!-- --></A><H3>
getContent</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>getContent</B>()</PRE>
<DL>
<DD>Return the content String to stream back to the client.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the content String to stream back to the client</DL>
</DD>
</DL>
<HR>
<A NAME="setBytes(byte[], java.lang.String)"><!-- --></A><H3>
setBytes</H3>
<PRE>
public void <B>setBytes</B>(byte[]&nbsp;bytes,
<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>&nbsp;contentType)</PRE>
<DL>
<DD>Set the byte array to stream back to the client.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bytes</CODE> - the byte array to stream back to the client</DL>
</DD>
</DL>
<HR>
<A NAME="getBytes()"><!-- --></A><H3>
getBytes</H3>
<PRE>
public byte[] <B>getBytes</B>()</PRE>
<DL>
<DD>Return the byte array to stream back to the client.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the byte array to stream back to the client</DL>
</DD>
</DL>
<HR>
<A NAME="setInputStream(java.io.InputStream)"><!-- --></A><H3>
setInputStream</H3>
<PRE>
public void <B>setInputStream</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;inputStream)</PRE>
<DL>
<DD>Set the content to stream back to the client.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inputStream</CODE> - the inputStream to stream back to the client</DL>
</DD>
</DL>
<HR>
<A NAME="getInputStream()"><!-- --></A><H3>
getInputStream</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> <B>getInputStream</B>()</PRE>
<DL>
<DD>Return the inputStream to stream back to the client.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the inputStream to stream back to the client</DL>
</DD>
</DL>
<HR>
<A NAME="setReader(java.io.Reader)"><!-- --></A><H3>
setReader</H3>
<PRE>
public void <B>setReader</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A>&nbsp;reader)</PRE>
<DL>
<DD>Set the reader which characters are streamed back to the client.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader which characters are streamed back to the client.</DL>
</DD>
</DL>
<HR>
<A NAME="getReader()"><!-- --></A><H3>
getReader</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html" title="class or interface in java.io">Reader</A> <B>getReader</B>()</PRE>
<DL>
<DD>Return the reader which characters are streamed back to the client.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the reader which characters are streamed back to the client.</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>&lt;<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>&gt; <B>getModel</B>()</PRE>
<DL>
<DD>Return the data model for the ActionResult <A HREF="../../../org/apache/click/ActionResult.html#template"><CODE>template</CODE></A>.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the data model for the ActionResult template</DL>
</DD>
</DL>
<HR>
<A NAME="setModel(java.util.Map)"><!-- --></A><H3>
setModel</H3>
<PRE>
public void <B>setModel</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>&lt;<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>&gt;&nbsp;model)</PRE>
<DL>
<DD>Set the model of the ActionResult template to render.
<p/>
If the <A HREF="../../../org/apache/click/ActionResult.html#template"><CODE>template</CODE></A> property is set, the template and <A HREF="../../../org/apache/click/ActionResult.html#model"><CODE>model</CODE></A>
will be merged and the result will be streamed back to the client.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>model</CODE> - the model of the template to render</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 template to render for this ActionResult.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the template to render for this ActionResult</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>&nbsp;template)</PRE>
<DL>
<DD>Set the template to render for this ActionResult.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>template</CODE> - the template to render for this ActionResult</DL>
</DD>
</DL>
<HR>
<A NAME="render(org.apache.click.Context)"><!-- --></A><H3>
render</H3>
<PRE>
public final void <B>render</B>(<A HREF="../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A>&nbsp;context)</PRE>
<DL>
<DD>Render the ActionResult to the client.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the request context</DL>
</DD>
</DL>
<HR>
<A NAME="renderActionResult(org.apache.click.Context)"><!-- --></A><H3>
renderActionResult</H3>
<PRE>
protected void <B>renderActionResult</B>(<A HREF="../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A>&nbsp;context)</PRE>
<DL>
<DD>Render the ActionResult to the client. This method can be overridden
by subclasses if custom rendering or direct access to the
HttpServletResponse is required.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the request context</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>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/click/ActionListener.html" title="interface in org.apache.click"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/click/Behavior.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/ActionResult.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ActionResult.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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,'&amp;').replace(pr_lt,'&lt;').replace(pr_gt,'&gt;').replace(pr_quot,'&quot;');}function PR_textToHtml(str){return str.replace(pr_amp,'&amp;').replace(pr_lt,'&lt;').replace(pr_gt,'&gt;');}var pr_ltEnt=/&lt;/g;var pr_gtEnt=/&gt;/g;var pr_aposEnt=/&apos;/g;var pr_quotEnt=/&quot;/g;var pr_ampEnt=/&amp;/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&&currentDecoration){openDecoration=currentDecoration;html.push('<span class="',openDecoration,'">');}var htmlChunk=PR_textToHtml(tabExpander(sourceText.substring(outputIdx,sourceIdx))).replace(/(\r\n?|\n| ) /g,'$1&nbsp;').replace(/\r\n?|\n/g,'&nbsp;<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>