<!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> | |
AbstractControl (Click Framework API - v2.3.0) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.click.control.AbstractControl class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="AbstractControl (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/control/AbstractContainer.html" title="class in org.apache.click.control"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/click/control/AbstractLink.html" title="class in org.apache.click.control"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/click/control/AbstractControl.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="AbstractControl.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.control</FONT> | |
<BR> | |
Class AbstractControl</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.control.AbstractControl</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>, <A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></DD> | |
</DL> | |
<DL> | |
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/click/control/AbstractContainer.html" title="class in org.apache.click.control">AbstractContainer</A>, <A HREF="../../../../org/apache/click/control/AbstractLink.html" title="class in org.apache.click.control">AbstractLink</A>, <A HREF="../../../../org/apache/click/control/Field.html" title="class in org.apache.click.control">Field</A>, <A HREF="../../../../org/apache/click/control/Table.html" title="class in org.apache.click.control">Table</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public abstract class <B>AbstractControl</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="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></DL> | |
</PRE> | |
<P> | |
Provides a default implementation of the <A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click"><CODE>Control</CODE></A> interface | |
to make it easier for developers to create their own controls. | |
<p/> | |
Subclasses are expected to at least override <A HREF="../../../../org/apache/click/control/AbstractControl.html#getTag()"><CODE>getTag()</CODE></A> | |
to differentiate the control. However some controls do not map cleanly | |
to an html <em>tag</em>, in which case you can override | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#render(org.apache.click.util.HtmlStringBuffer)"><CODE>render(org.apache.click.util.HtmlStringBuffer)</CODE></A> for complete control | |
over the output. | |
<p/> | |
Below is an example of creating a new control called MyField: | |
<pre class="prettyprint"> | |
public class MyField extends AbstractControl { | |
private String value; | |
public void setValue(String value) { | |
this.value = value; | |
} | |
public String getValue() { | |
return value; | |
} | |
public String getTag() { | |
// Return the HTML tag | |
return "input"; | |
} | |
public boolean onProcess() { | |
// Bind the request parameter to the field value | |
String requestValue = getContext().getRequestParameter(getName()); | |
setValue(requestValue); | |
// Invoke any listener of MyField | |
return dispatchActionEvent(); | |
} | |
} | |
</pre> | |
By overriding <A HREF="../../../../org/apache/click/control/AbstractControl.html#getTag()"><CODE>getTag()</CODE></A> one can specify the html tag to render. | |
<p/> | |
Overriding <A HREF="../../../../org/apache/click/control/AbstractControl.html#onProcess()"><CODE>onProcess()</CODE></A> allows one to bind the servlet request | |
parameter to MyField value. The <A HREF="../../../../org/apache/click/control/AbstractControl.html#dispatchActionEvent()"><CODE>dispatchActionEvent()</CODE></A> method | |
registers the listener for this control on the Context. Once the onProcess | |
event has finished, all registered listeners will be fired. | |
<p/> | |
To view the html rendered by MyField invoke the control's <A HREF="../../../../org/apache/click/control/AbstractControl.html#toString()"><CODE>toString()</CODE></A> | |
method: | |
<pre class="prettyprint"> | |
public class Test { | |
public static void main (String args[]) { | |
// Create mock context in which to test the control. | |
MockContext.initContext(); | |
String fieldName = "myfield"; | |
MyField myfield = new MyField(fieldName); | |
String output = myfield.toString(); | |
System.out.println(output); | |
} | |
} </pre> | |
Executing the above test results in the following output: | |
<pre class="prettyprint"> | |
<input name="myfield" id="myfield"/></pre> | |
Also see <A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click"><CODE>Control</CODE></A> javadoc for an explanation of the | |
Control execution sequence. | |
<h3><a name="message-resources"></a>Message Resources and Internationalization (i18n)</h3> | |
Controls support a hierarchy of resource bundles for displaying messages. | |
These localized messages can be accessed through the methods: | |
<ul> | |
<li><A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessage(java.lang.String)"><CODE>getMessage(String)</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessage(java.lang.String, java.lang.Object...)"><CODE>getMessage(String, Object...)</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessages()"><CODE>getMessages()</CODE></A></li> | |
</ul> | |
The order in which localized messages resolve are described in the | |
<a href="../../../../../user-guide/html/ch03s04.html#message-resolution">user guide</a>. | |
<P> | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.apache.click.control.AbstractControl">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="../../../../org/apache/click/ActionListener.html" title="interface in org.apache.click">ActionListener</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#actionListener">actionListener</A></B></CODE> | |
<BR> | |
The control's action listener.</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/control/AbstractControl.html#attributes">attributes</A></B></CODE> | |
<BR> | |
The Control attributes Map.</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/Set.html" title="class or interface in java.util">Set</A><<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#behaviors">behaviors</A></B></CODE> | |
<BR> | |
The control's list of <A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click"><CODE>behaviors</CODE></A>.</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/control/AbstractControl.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/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#listener">listener</A></B></CODE> | |
<BR> | |
The listener target 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/control/AbstractControl.html#listenerMethod">listenerMethod</A></B></CODE> | |
<BR> | |
The listener method name.</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/control/AbstractControl.html#messages">messages</A></B></CODE> | |
<BR> | |
The Control localized messages Map.</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/control/AbstractControl.html#name">name</A></B></CODE> | |
<BR> | |
The Control name.</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/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#parent">parent</A></B></CODE> | |
<BR> | |
The control's parent.</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/control/AbstractControl.html#styles">styles</A></B></CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use <A HREF="../../../../org/apache/click/control/AbstractControl.html#addStyleClass(java.lang.String)"><CODE>addStyleClass(String)</CODE></A> and | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#removeStyleClass(java.lang.String)"><CODE>removeStyleClass(String)</CODE></A> instead.</I></TD> | |
</TR> | |
</TABLE> | |
<A NAME="fields_inherited_from_class_org.apache.click.Control"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Fields inherited from interface org.apache.click.<A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="../../../../org/apache/click/Control.html#CONTROL_MESSAGES">CONTROL_MESSAGES</A></CODE></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/control/AbstractControl.html#AbstractControl()">AbstractControl</A></B>()</CODE> | |
<BR> | |
Create a control with no name defined.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#AbstractControl(java.lang.String)">AbstractControl</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> | |
Create a control with the given name.</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/control/AbstractControl.html#addBehavior(org.apache.click.Behavior)">addBehavior</A></B>(<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A> behavior)</CODE> | |
<BR> | |
Add the given <tt>Behavior</tt> to the control's Set of | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#getBehaviors()"><CODE>Behaviors</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#addStyleClass(java.lang.String)">addStyleClass</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> | |
Add the CSS class attribute.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#appendAttributes(org.apache.click.util.HtmlStringBuffer)">appendAttributes</A></B>(<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</CODE> | |
<BR> | |
Append all the controls attributes to the specified buffer.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#dispatchActionEvent()">dispatchActionEvent</A></B>()</CODE> | |
<BR> | |
Dispatch an action event to the <A HREF="../../../../org/apache/click/ActionEventDispatcher.html" title="class in org.apache.click"><CODE>ActionEventDispatcher</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/click/ActionListener.html" title="interface in org.apache.click">ActionListener</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#getActionListener()">getActionListener</A></B>()</CODE> | |
<BR> | |
Return the control's action listener.</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/control/AbstractControl.html#getAttribute(java.lang.String)">getAttribute</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 control HTML attribute with the given name, or null if the | |
attribute does not exist.</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/control/AbstractControl.html#getAttributes()">getAttributes</A></B>()</CODE> | |
<BR> | |
Return the control's attributes 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/util/Set.html" title="class or interface in java.util">Set</A><<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A>></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#getBehaviors()">getBehaviors</A></B>()</CODE> | |
<BR> | |
Returns the Set of <tt>Behaviors</tt> for this control.</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/control/AbstractControl.html#getContext()">getContext</A></B>()</CODE> | |
<BR> | |
Return the Page request Context of the Control.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#getControlSizeEst()">getControlSizeEst</A></B>()</CODE> | |
<BR> | |
Return the estimated rendered control size in characters.</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/control/AbstractControl.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/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#getHtmlImports()">getHtmlImports</A></B>()</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use the new <A HREF="../../../../org/apache/click/control/AbstractControl.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/control/AbstractControl.html#getId()">getId</A></B>()</CODE> | |
<BR> | |
Return the "id" attribute value if defined, or the control name otherwise.</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/control/AbstractControl.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 message for the given key 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/control/AbstractControl.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 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/control/AbstractControl.html#getMessages()">getMessages</A></B>()</CODE> | |
<BR> | |
Return a Map of localized messages for the control.</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/control/AbstractControl.html#getName()">getName</A></B>()</CODE> | |
<BR> | |
Return the name of the Control.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#getPage()">getPage</A></B>()</CODE> | |
<BR> | |
Return the parent page of this control, or null if not defined.</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/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#getParent()">getParent</A></B>()</CODE> | |
<BR> | |
Return the parent of the Control.</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/control/AbstractControl.html#getStyle(java.lang.String)">getStyle</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 control CSS style for the given name.</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/control/AbstractControl.html#getStyles()">getStyles</A></B>()</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use <A HREF="../../../../org/apache/click/control/AbstractControl.html#getAttribute(java.lang.String)"><CODE>getAttribute(String)</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/control/AbstractControl.html#getTag()">getTag</A></B>()</CODE> | |
<BR> | |
Returns the controls html tag.</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/control/AbstractControl.html#hasAttribute(java.lang.String)">hasAttribute</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> | |
Returns true if specified attribute is defined, 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/control/AbstractControl.html#hasAttributes()">hasAttributes</A></B>()</CODE> | |
<BR> | |
Return true if the control has attributes or 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/control/AbstractControl.html#hasBehaviors()">hasBehaviors</A></B>()</CODE> | |
<BR> | |
Returns <tt>true</tt> if this control has any | |
<tt>Behavior</tt>s registered, <tt>false</tt> 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/control/AbstractControl.html#hasStyles()">hasStyles</A></B>()</CODE> | |
<BR> | |
<B>Deprecated.</B> <I>use <A HREF="../../../../org/apache/click/control/AbstractControl.html#hasAttribute(java.lang.String)"><CODE>hasAttribute(String)</CODE></A> instead</I></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/control/AbstractControl.html#isAjaxTarget(org.apache.click.Context)">isAjaxTarget</A></B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</CODE> | |
<BR> | |
Returns <tt>true</tt> if this control is an AJAX target, <tt>false</tt> | |
otherwise.</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/control/AbstractControl.html#onDeploy(javax.servlet.ServletContext)">onDeploy</A></B>(<A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A> servletContext)</CODE> | |
<BR> | |
This method does nothing.</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/control/AbstractControl.html#onDestroy()">onDestroy</A></B>()</CODE> | |
<BR> | |
This method does nothing.</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/control/AbstractControl.html#onInit()">onInit</A></B>()</CODE> | |
<BR> | |
This method does nothing.</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/control/AbstractControl.html#onProcess()">onProcess</A></B>()</CODE> | |
<BR> | |
The on process 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/control/AbstractControl.html#onRender()">onRender</A></B>()</CODE> | |
<BR> | |
This method does nothing.</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/control/AbstractControl.html#removeBehavior(org.apache.click.Behavior)">removeBehavior</A></B>(<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A> behavior)</CODE> | |
<BR> | |
Remove the given <tt>Behavior</tt> from the Control's Set of | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#getBehaviors()"><CODE>Behaviors</CODE></A>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#removeStyleClass(java.lang.String)">removeStyleClass</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> | |
Removes the CSS class attribute.</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/control/AbstractControl.html#render(org.apache.click.util.HtmlStringBuffer)">render</A></B>(<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</CODE> | |
<BR> | |
Render the control's output to the specified buffer.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#renderTagBegin(java.lang.String, org.apache.click.util.HtmlStringBuffer)">renderTagBegin</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> tagName, | |
<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</CODE> | |
<BR> | |
Render the tag and common attributes including <A HREF="../../../../org/apache/click/control/AbstractControl.html#getId()"><CODE>id</CODE></A>, | |
<tt>class</tt> and <tt>style</tt>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/AbstractControl.html#renderTagEnd(java.lang.String, org.apache.click.util.HtmlStringBuffer)">renderTagEnd</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> tagName, | |
<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</CODE> | |
<BR> | |
Closes the specified tag.</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/control/AbstractControl.html#setActionListener(org.apache.click.ActionListener)">setActionListener</A></B>(<A HREF="../../../../org/apache/click/ActionListener.html" title="interface in org.apache.click">ActionListener</A> listener)</CODE> | |
<BR> | |
Set the control's action listener.</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/control/AbstractControl.html#setAttribute(java.lang.String, java.lang.String)">setAttribute</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/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the control attribute with the given attribute name and 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/control/AbstractControl.html#setId(java.lang.String)">setId</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> id)</CODE> | |
<BR> | |
Set the HTML id attribute for the control 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/control/AbstractControl.html#setListener(java.lang.Object, java.lang.String)">setListener</A></B>(<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> listener, | |
<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> method)</CODE> | |
<BR> | |
Set the controls event listener.</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/control/AbstractControl.html#setName(java.lang.String)">setName</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> | |
Set the name of the Control.</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/control/AbstractControl.html#setParent(java.lang.Object)">setParent</A></B>(<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> parent)</CODE> | |
<BR> | |
Set the parent of the Control.</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/control/AbstractControl.html#setStyle(java.lang.String, java.lang.String)">setStyle</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/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the control CSS style name and value pair.</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/control/AbstractControl.html#toString()">toString</A></B>()</CODE> | |
<BR> | |
Returns the HTML representation of this control.</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#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="actionListener"><!-- --></A><H3> | |
actionListener</H3> | |
<PRE> | |
protected <A HREF="../../../../org/apache/click/ActionListener.html" title="interface in org.apache.click">ActionListener</A> <B>actionListener</B></PRE> | |
<DL> | |
<DD>The control's action listener. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="behaviors"><!-- --></A><H3> | |
behaviors</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A><<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A>> <B>behaviors</B></PRE> | |
<DL> | |
<DD>The control's list of <A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click"><CODE>behaviors</CODE></A>. | |
<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="attributes"><!-- --></A><H3> | |
attributes</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/String.html" title="class or interface in java.lang">String</A>> <B>attributes</B></PRE> | |
<DL> | |
<DD>The Control attributes Map. | |
<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 Control localized messages Map. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="name"><!-- --></A><H3> | |
name</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>name</B></PRE> | |
<DL> | |
<DD>The Control name. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="parent"><!-- --></A><H3> | |
parent</H3> | |
<PRE> | |
protected <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>parent</B></PRE> | |
<DL> | |
<DD>The control's parent. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="styles"><!-- --></A><H3> | |
styles</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/String.html" title="class or interface in java.lang">String</A>> <B>styles</B></PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use <A HREF="../../../../org/apache/click/control/AbstractControl.html#addStyleClass(java.lang.String)"><CODE>addStyleClass(String)</CODE></A> and | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#removeStyleClass(java.lang.String)"><CODE>removeStyleClass(String)</CODE></A> instead.</I><DD>The Map of CSS style attributes. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="listener"><!-- --></A><H3> | |
listener</H3> | |
<PRE> | |
protected <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>listener</B></PRE> | |
<DL> | |
<DD>The listener target object. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="listenerMethod"><!-- --></A><H3> | |
listenerMethod</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>listenerMethod</B></PRE> | |
<DL> | |
<DD>The listener method name. | |
<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="AbstractControl()"><!-- --></A><H3> | |
AbstractControl</H3> | |
<PRE> | |
public <B>AbstractControl</B>()</PRE> | |
<DL> | |
<DD>Create a control with no name defined. | |
<P> | |
</DL> | |
<HR> | |
<A NAME="AbstractControl(java.lang.String)"><!-- --></A><H3> | |
AbstractControl</H3> | |
<PRE> | |
public <B>AbstractControl</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>Create a control with the given name. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the control name</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="getTag()"><!-- --></A><H3> | |
getTag</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>getTag</B>()</PRE> | |
<DL> | |
<DD>Returns the controls html tag. | |
<p/> | |
Subclasses should override this method and return the correct tag. | |
<p/> | |
This method returns <tt>null</tt> by default. | |
<p/> | |
Example tags include <tt>table</tt>, <tt>form</tt>, <tt>a</tt> and | |
<tt>input</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>this controls html tag</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getActionListener()"><!-- --></A><H3> | |
getActionListener</H3> | |
<PRE> | |
public <A HREF="../../../../org/apache/click/ActionListener.html" title="interface in org.apache.click">ActionListener</A> <B>getActionListener</B>()</PRE> | |
<DL> | |
<DD>Return the control's action listener. If the control has a listener | |
target and listener method defined, this method will return an | |
<A HREF="../../../../org/apache/click/ActionListener.html" title="interface in org.apache.click"><CODE>ActionListener</CODE></A> instance. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the control's action listener</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setActionListener(org.apache.click.ActionListener)"><!-- --></A><H3> | |
setActionListener</H3> | |
<PRE> | |
public void <B>setActionListener</B>(<A HREF="../../../../org/apache/click/ActionListener.html" title="interface in org.apache.click">ActionListener</A> listener)</PRE> | |
<DL> | |
<DD>Set the control's action listener. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the control's action listener</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasBehaviors()"><!-- --></A><H3> | |
hasBehaviors</H3> | |
<PRE> | |
public boolean <B>hasBehaviors</B>()</PRE> | |
<DL> | |
<DD>Returns <tt>true</tt> if this control has any | |
<tt>Behavior</tt>s registered, <tt>false</tt> otherwise. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#hasBehaviors()">hasBehaviors</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD><tt>true</tt> if this control has any <tt>Behavior</tt>s registered, | |
<tt>false</tt> otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addBehavior(org.apache.click.Behavior)"><!-- --></A><H3> | |
addBehavior</H3> | |
<PRE> | |
public void <B>addBehavior</B>(<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A> behavior)</PRE> | |
<DL> | |
<DD>Add the given <tt>Behavior</tt> to the control's Set of | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#getBehaviors()"><CODE>Behaviors</CODE></A>. | |
<p/> | |
In addition, the Control will be registered with the | |
<A HREF="../../../../org/apache/click/ControlRegistry.html#registerAjaxTarget(org.apache.click.Control)"><CODE>ControlRegistry</CODE></A> | |
as a potential <tt>Ajax target control</tt> and to have it's | |
<tt>Behaviors</tt> processed by the Click runtime. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>behavior</CODE> - the <tt>Behavior</tt> to add</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="removeBehavior(org.apache.click.Behavior)"><!-- --></A><H3> | |
removeBehavior</H3> | |
<PRE> | |
public void <B>removeBehavior</B>(<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A> behavior)</PRE> | |
<DL> | |
<DD>Remove the given <tt>Behavior</tt> from the Control's Set of | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#getBehaviors()"><CODE>Behaviors</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>behavior</CODE> - the <tt>Behavior</tt> to remove</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getBehaviors()"><!-- --></A><H3> | |
getBehaviors</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A><<A HREF="../../../../org/apache/click/Behavior.html" title="interface in org.apache.click">Behavior</A>> <B>getBehaviors</B>()</PRE> | |
<DL> | |
<DD>Returns the Set of <tt>Behaviors</tt> for this control. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#getBehaviors()">getBehaviors</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Set of <tt>Behaviors</tt> for this control</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isAjaxTarget(org.apache.click.Context)"><!-- --></A><H3> | |
isAjaxTarget</H3> | |
<PRE> | |
public boolean <B>isAjaxTarget</B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</PRE> | |
<DL> | |
<DD>Returns <tt>true</tt> if this control is an AJAX target, <tt>false</tt> | |
otherwise. | |
<p/> | |
The control is defined as an Ajax target if the control <A HREF="../../../../org/apache/click/control/AbstractControl.html#getId()"><CODE>ID</CODE></A> | |
is send as a request parameter. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#isAjaxTarget(org.apache.click.Context)">isAjaxTarget</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the request context | |
<DT><B>Returns:</B><DD><tt>true</tt> if this control is an AJAX target, <tt>false</tt> | |
otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getAttribute(java.lang.String)"><!-- --></A><H3> | |
getAttribute</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>getAttribute</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 control HTML attribute with the given name, or null if the | |
attribute does not exist. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of link HTML attribute | |
<DT><B>Returns:</B><DD>the link HTML attribute</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setAttribute(java.lang.String, java.lang.String)"><!-- --></A><H3> | |
setAttribute</H3> | |
<PRE> | |
public void <B>setAttribute</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/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the control attribute with the given attribute name and value. You would | |
generally use attributes if you were creating the entire Control | |
programmatically and rendering it with the <A HREF="../../../../org/apache/click/control/AbstractControl.html#toString()"><CODE>toString()</CODE></A> method. | |
<p/> | |
For example given the ActionLink: | |
<pre class="codeJava"> | |
ActionLink addLink = <span class="kw">new</span> ActionLink(<span class="red">"addLink"</span>, <span class="st">"Add"</span>); | |
addLink.setAttribute(<span class="st">"target"</span>, <span class="st">"_blank"</span>); </pre> | |
Will render the HTML as: | |
<pre class="codeHtml"> | |
<a href=".." <span class="st">target</span>=<span class="st">"_blank"</span>><span class="st">Add</span></a> </pre> | |
<b>Note:</b> for <tt>style</tt> and <tt>class</tt> attributes you can | |
also use the methods <A HREF="../../../../org/apache/click/control/AbstractControl.html#setStyle(java.lang.String, java.lang.String)"><CODE>setStyle(String, String)</CODE></A> and | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#addStyleClass(java.lang.String)"><CODE>addStyleClass(String)</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute name<DD><CODE>value</CODE> - the attribute value | |
<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 name parameter is null<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/AbstractControl.html#setStyle(java.lang.String, java.lang.String)"><CODE>setStyle(String, String)</CODE></A>, | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#addStyleClass(java.lang.String)"><CODE>addStyleClass(String)</CODE></A>, | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#removeStyleClass(java.lang.String)"><CODE>removeStyleClass(String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getAttributes()"><!-- --></A><H3> | |
getAttributes</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>getAttributes</B>()</PRE> | |
<DL> | |
<DD>Return the control's attributes Map. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the control's attributes Map.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasAttributes()"><!-- --></A><H3> | |
hasAttributes</H3> | |
<PRE> | |
public boolean <B>hasAttributes</B>()</PRE> | |
<DL> | |
<DD>Return true if the control has attributes or false otherwise. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the control has attributes on false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasAttribute(java.lang.String)"><!-- --></A><H3> | |
hasAttribute</H3> | |
<PRE> | |
public boolean <B>hasAttribute</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>Returns true if specified attribute is defined, false otherwise. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the specified attribute to check | |
<DT><B>Returns:</B><DD>true if name is a defined attribute</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><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/Control.html#getContext()">Control</A></CODE></B></DD> | |
<DD>Return the Page request Context of the Control. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#getContext()">getContext</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Page request Context<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#getContext()"><CODE>Control.getContext()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getName()"><!-- --></A><H3> | |
getName</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>getName</B>()</PRE> | |
<DL> | |
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/Control.html#getName()">Control</A></CODE></B></DD> | |
<DD>Return the name of the Control. Each control name must be unique in the | |
containing Page model or the containing Form. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#getName()">getName</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the name of the control<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#getName()"><CODE>Control.getName()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setName(java.lang.String)"><!-- --></A><H3> | |
setName</H3> | |
<PRE> | |
public void <B>setName</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><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/Control.html#setName(java.lang.String)">Control</A></CODE></B></DD> | |
<DD>Set the name of the Control. Each control name must be unique in the | |
containing Page model or the parent container. | |
<p/> | |
<b>Please note:</b> changing the name of a Control after it has been | |
added to its parent container is undefined. Thus it is best <b>not</b> | |
to change the name of a Control once its been set. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#setName(java.lang.String)">setName</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - of the control | |
<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 is null<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#setName(java.lang.String)"><CODE>Control.setName(String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getId()"><!-- --></A><H3> | |
getId</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>getId</B>()</PRE> | |
<DL> | |
<DD>Return the "id" attribute value if defined, or the control name otherwise. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#getId()">getId</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>HTML element identifier attribute "id" value<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#getId()"><CODE>Control.getId()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setId(java.lang.String)"><!-- --></A><H3> | |
setId</H3> | |
<PRE> | |
public void <B>setId</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> id)</PRE> | |
<DL> | |
<DD>Set the HTML id attribute for the control with the given value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>id</CODE> - the element HTML id attribute value to set</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 message for the given key or null if not found. | |
The resource message returned will use the Locale obtained from the | |
Context. | |
<p/> | |
This method will attempt to lookup the localized message in the | |
parent's messages, which resolves to the Page's resource bundle. | |
<p/> | |
If the message was not found, this method will attempt to look up the | |
value in the <tt>/click-control.properties</tt> message properties file, | |
through the method <A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessages()"><CODE>getMessages()</CODE></A>. | |
<p/> | |
If still not found, this method will return null. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the message resource | |
<DT><B>Returns:</B><DD>the named localized message for the control, or null if not 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 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/control/AbstractControl.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 control 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 control. The messages returned | |
will use the Locale obtained from the Context. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#getMessages()">getMessages</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>a Map of localized messages for the control | |
<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 control has not be set</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getParent()"><!-- --></A><H3> | |
getParent</H3> | |
<PRE> | |
public <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>getParent</B>()</PRE> | |
<DL> | |
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/Control.html#getParent()">Control</A></CODE></B></DD> | |
<DD>Return the parent of the Control. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#getParent()">getParent</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Control's parent<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#getParent()"><CODE>Control.getParent()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setParent(java.lang.Object)"><!-- --></A><H3> | |
setParent</H3> | |
<PRE> | |
public void <B>setParent</B>(<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> parent)</PRE> | |
<DL> | |
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/Control.html#setParent(java.lang.Object)">Control</A></CODE></B></DD> | |
<DD>Set the parent of the Control. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#setParent(java.lang.Object)">setParent</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the parent of the Control | |
<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 given parent instance is | |
referencing <tt>this</tt> object: <tt>if (parent == this)</tt><DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#setParent(java.lang.Object)"><CODE>Control.setParent(Object)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onProcess()"><!-- --></A><H3> | |
onProcess</H3> | |
<PRE> | |
public boolean <B>onProcess</B>()</PRE> | |
<DL> | |
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/Control.html#onProcess()">Control</A></CODE></B></DD> | |
<DD>The on process event handler. Each control will be processed when the | |
Page is requested. | |
<p/> | |
ClickServlet will process all Page controls in the order they were added | |
to the Page. | |
<p/> | |
<A HREF="../../../../org/apache/click/control/Container.html" title="interface in org.apache.click.control"><CODE>Container</CODE></A> implementations should recursively | |
invoke the onProcess method on each of their child controls ensuring that | |
all controls receive this event. However when a control onProcess method | |
return false, no other controls onProcess method should be invoked. | |
<p/> | |
When a control is processed it should return true if the Page should | |
continue event processing, or false if no other controls should be | |
processed and the <A HREF="../../../../org/apache/click/Page.html#onGet()"><CODE>Page.onGet()</CODE></A> or <A HREF="../../../../org/apache/click/Page.html#onPost()"><CODE>Page.onPost()</CODE></A> methods | |
should not be invoked. | |
<p/> | |
<b>Please note:</b> a common problem when overriding onProcess in | |
subclasses is forgetting to call <em>super.onProcess()</em>. Consider | |
carefully whether you should call <em>super.onProcess()</em> or not, | |
especially for <A HREF="../../../../org/apache/click/control/Container.html" title="interface in org.apache.click.control"><CODE>Container</CODE></A>s which by default | |
call <em>onProcess</em> on all their child controls as well. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#onProcess()">onProcess</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true to continue Page event processing or false otherwise<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#onProcess()"><CODE>Control.onProcess()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setListener(java.lang.Object, java.lang.String)"><!-- --></A><H3> | |
setListener</H3> | |
<PRE> | |
public void <B>setListener</B>(<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> listener, | |
<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> method)</PRE> | |
<DL> | |
<DD>Set the controls event listener. | |
<p/> | |
The method signature of the listener is:<ul> | |
<li>must have a valid Java method name</li> | |
<li>takes no arguments</li> | |
<li>returns a boolean value</li> | |
</ul> | |
<p/> | |
An example event listener method would be: | |
<pre class="codeJava"> | |
<span class="kw">public boolean</span> onClick() { | |
System.out.println(<span class="st">"onClick called"</span>); | |
<span class="kw">return true</span>; | |
} </pre> | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#setListener(java.lang.Object, java.lang.String)">setListener</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener object with the named method to invoke<DD><CODE>method</CODE> - the name of the method to invoke</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onInit()"><!-- --></A><H3> | |
onInit</H3> | |
<PRE> | |
public void <B>onInit</B>()</PRE> | |
<DL> | |
<DD>This method does nothing. Subclasses may override this method to perform | |
initialization. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#onInit()">onInit</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#onInit()"><CODE>Control.onInit()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onDestroy()"><!-- --></A><H3> | |
onDestroy</H3> | |
<PRE> | |
public void <B>onDestroy</B>()</PRE> | |
<DL> | |
<DD>This method does nothing. Subclasses may override this method to perform | |
clean up any resources. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#onDestroy()">onDestroy</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#onDestroy()"><CODE>Control.onDestroy()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onDeploy(javax.servlet.ServletContext)"><!-- --></A><H3> | |
onDeploy</H3> | |
<PRE> | |
public void <B>onDeploy</B>(<A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A> servletContext)</PRE> | |
<DL> | |
<DD>This method does nothing. Subclasses may override this method to deploy | |
static web resources. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#onDeploy(javax.servlet.ServletContext)">onDeploy</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - the servlet context<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#onDeploy(javax.servlet.ServletContext)"><CODE>Control.onDeploy(ServletContext)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onRender()"><!-- --></A><H3> | |
onRender</H3> | |
<PRE> | |
public void <B>onRender</B>()</PRE> | |
<DL> | |
<DD>This method does nothing. Subclasses may override this method to perform | |
pre rendering logic. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#onRender()">onRender</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#onRender()"><CODE>Control.onRender()</CODE></A></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/control/AbstractControl.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><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/Control.html#getHeadElements()">Control</A></CODE></B></DD> | |
<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/> | |
Controls can contribute their own list of HEAD elements by implementing | |
this method. | |
<p/> | |
The recommended approach when implementing 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 MyControl extends AbstractControl { | |
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 control's external JavaScript resource | |
JsImport jsImport = new JsImport("/mycorp/mycontrol/mycontrol.js"); | |
headElements.add(jsImport); | |
// Include the control's external Css resource | |
CssImport cssImport = new CssImport("/mycorp/mycontrol/mycontrol.css"); | |
headElements.add(cssImport); | |
} | |
return headElements; | |
} | |
} </pre> | |
Alternatively one can add the HEAD elements in the Control's constructor: | |
<pre class="prettyprint"> | |
public MyControl extends AbstractControl { | |
public MyControl() { | |
JsImport jsImport = new JsImport("/mycorp/mycontrol/mycontrol.js"); | |
getHeadElements().add(jsImport); | |
CssImport cssImport = new CssImport("/mycorp/mycontrol/mycontrol.css"); | |
getHeadHeaders().add(cssImport); | |
} | |
} </pre> | |
One can also add HEAD elements from event handler methods such as | |
<A HREF="../../../../org/apache/click/Control.html#onInit()"><CODE>Control.onInit()</CODE></A>, <A HREF="../../../../org/apache/click/Control.html#onProcess()"><CODE>Control.onProcess()</CODE></A>, <A HREF="../../../../org/apache/click/Control.html#onRender()"><CODE>Control.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> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#getHeadElements()">getHeadElements</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the list of HEAD elements to be included in the page<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#getHeadElements()"><CODE>Control.getHeadElements()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getPage()"><!-- --></A><H3> | |
getPage</H3> | |
<PRE> | |
public <A HREF="../../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A> <B>getPage</B>()</PRE> | |
<DL> | |
<DD>Return the parent page of this control, or null if not defined. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the parent page of this control, or null if not defined</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getStyle(java.lang.String)"><!-- --></A><H3> | |
getStyle</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>getStyle</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 control CSS style for the given name. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the CSS style name | |
<DT><B>Returns:</B><DD>the CSS style for the given name</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setStyle(java.lang.String, java.lang.String)"><!-- --></A><H3> | |
setStyle</H3> | |
<PRE> | |
public void <B>setStyle</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/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the control CSS style name and value pair. | |
<p/> | |
For example given the ActionLink: | |
<pre class="codeJava"> | |
ActionLink addLink = <span class="kw">new</span> ActionLink(<span class="red">"addLink"</span>, <span class="st">"Add"</span>); | |
addLink.setStyle(<span class="st">"color"</span>, <span class="st">"red"</span>); | |
addLink.setStyle(<span class="st">"border"</span>, <span class="st">"1px solid black"</span>); </pre> | |
Will render the HTML as: | |
<pre class="codeHtml"> | |
<a href=".." <span class="st">style</span>=<span class="st">"color:red;border:1px solid black;"</span>><span class="st">Add</span></a> | |
</pre> | |
To remove an existing style, set the value to <tt>null</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the CSS style name<DD><CODE>value</CODE> - the CSS style value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="hasStyles()"><!-- --></A><H3> | |
hasStyles</H3> | |
<PRE> | |
public boolean <B>hasStyles</B>()</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use <A HREF="../../../../org/apache/click/control/AbstractControl.html#hasAttribute(java.lang.String)"><CODE>hasAttribute(String)</CODE></A> instead</I> | |
<P> | |
<DD>Return true if CSS styles are defined. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if CSS styles are defined</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getStyles()"><!-- --></A><H3> | |
getStyles</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>getStyles</B>()</PRE> | |
<DL> | |
<DD><B>Deprecated.</B> <I>use <A HREF="../../../../org/apache/click/control/AbstractControl.html#getAttribute(java.lang.String)"><CODE>getAttribute(String)</CODE></A> instead</I> | |
<P> | |
<DD>Return the Map of control CSS styles. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Map of control CSS styles</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="addStyleClass(java.lang.String)"><!-- --></A><H3> | |
addStyleClass</H3> | |
<PRE> | |
public void <B>addStyleClass</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>Add the CSS class attribute. Null values will be ignored. | |
<p/> | |
For example given the ActionLink: | |
<pre class="prettyprint"> | |
ActionLink addLink = new ActionLink("addLink", "Add"); | |
addLink.addStyleClass("red"); </pre> | |
Will render the HTML as: | |
<pre class="prettyprint"> | |
<a href=".." class="red">Add</a> </pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the class attribute to add</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="removeStyleClass(java.lang.String)"><!-- --></A><H3> | |
removeStyleClass</H3> | |
<PRE> | |
public void <B>removeStyleClass</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>Removes the CSS class attribute. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the CSS class attribute</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="render(org.apache.click.util.HtmlStringBuffer)"><!-- --></A><H3> | |
render</H3> | |
<PRE> | |
public void <B>render</B>(<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</PRE> | |
<DL> | |
<DD>Render the control's output to the specified buffer. | |
<p/> | |
If <A HREF="../../../../org/apache/click/control/AbstractControl.html#getTag()"><CODE>getTag()</CODE></A> returns null, this method will return an empty | |
string. | |
<p/> | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Control.html#render(org.apache.click.util.HtmlStringBuffer)">render</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Control.html" title="interface in org.apache.click">Control</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the specified buffer to render the control's output to<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/Control.html#render(org.apache.click.util.HtmlStringBuffer)"><CODE>Control.render(org.apache.click.util.HtmlStringBuffer)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="toString()"><!-- --></A><H3> | |
toString</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>toString</B>()</PRE> | |
<DL> | |
<DD>Returns the HTML representation of this control. | |
<p/> | |
This method delegates the rendering to the method | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#render(org.apache.click.util.HtmlStringBuffer)"><CODE>render(org.apache.click.util.HtmlStringBuffer)</CODE></A>. The size of buffer | |
is determined by <A HREF="../../../../org/apache/click/control/AbstractControl.html#getControlSizeEst()"><CODE>getControlSizeEst()</CODE></A>. | |
<P> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><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></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the HTML representation of this control<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang"><CODE>Object.toString()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="dispatchActionEvent()"><!-- --></A><H3> | |
dispatchActionEvent</H3> | |
<PRE> | |
protected void <B>dispatchActionEvent</B>()</PRE> | |
<DL> | |
<DD>Dispatch an action event to the <A HREF="../../../../org/apache/click/ActionEventDispatcher.html" title="class in org.apache.click"><CODE>ActionEventDispatcher</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/ActionEventDispatcher.html#dispatchActionEvent(org.apache.click.Control, org.apache.click.ActionListener)"><CODE>ActionEventDispatcher.dispatchActionEvent(org.apache.click.Control, org.apache.click.ActionListener)</CODE></A>, | |
<A HREF="../../../../org/apache/click/ActionEventDispatcher.html#dispatchAjaxBehaviors(org.apache.click.Control)"><CODE>ActionEventDispatcher.dispatchAjaxBehaviors(org.apache.click.Control)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="appendAttributes(org.apache.click.util.HtmlStringBuffer)"><!-- --></A><H3> | |
appendAttributes</H3> | |
<PRE> | |
protected void <B>appendAttributes</B>(<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</PRE> | |
<DL> | |
<DD>Append all the controls attributes to the specified buffer. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the specified buffer to append all the attributes</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderTagBegin(java.lang.String, org.apache.click.util.HtmlStringBuffer)"><!-- --></A><H3> | |
renderTagBegin</H3> | |
<PRE> | |
protected void <B>renderTagBegin</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> tagName, | |
<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</PRE> | |
<DL> | |
<DD>Render the tag and common attributes including <A HREF="../../../../org/apache/click/control/AbstractControl.html#getId()"><CODE>id</CODE></A>, | |
<tt>class</tt> and <tt>style</tt>. The <A HREF="../../../../org/apache/click/control/AbstractControl.html#getName()"><CODE>name</CODE></A> attribute | |
is <em>not</em> rendered by this control. It is up to subclasses | |
whether to render the name attribute or not. Generally only | |
<A HREF="../../../../org/apache/click/control/Field.html" title="class in org.apache.click.control"><CODE>Field</CODE></A> controls render the name attribute. | |
<p/> | |
<b>Please note:</b> the tag will not be closed by this method. This | |
enables callers of this method to append extra attributes as needed. | |
<p/> | |
For example the following example: | |
<pre class="prettyprint"> | |
Field field = new TextField("mytext"); | |
HtmlStringBuffer buffer = new HtmlStringBuffer(); | |
field.renderTagBegin("input", buffer); </pre> | |
will render: | |
<pre class="prettyprint"> | |
<input name="mytext" id="mytext" </pre> | |
<b>Note</b> that the tag is not closed, so subclasses can render extra | |
attributes. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>tagName</CODE> - the name of the tag to render<DD><CODE>buffer</CODE> - the buffer to append the output to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="renderTagEnd(java.lang.String, org.apache.click.util.HtmlStringBuffer)"><!-- --></A><H3> | |
renderTagEnd</H3> | |
<PRE> | |
protected void <B>renderTagEnd</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> tagName, | |
<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util">HtmlStringBuffer</A> buffer)</PRE> | |
<DL> | |
<DD>Closes the specified tag. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>tagName</CODE> - the name of the tag to close<DD><CODE>buffer</CODE> - the buffer to append the output to</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getControlSizeEst()"><!-- --></A><H3> | |
getControlSizeEst</H3> | |
<PRE> | |
protected int <B>getControlSizeEst</B>()</PRE> | |
<DL> | |
<DD>Return the estimated rendered control size in characters. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the estimated rendered control size in characters</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/control/AbstractContainer.html" title="class in org.apache.click.control"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/click/control/AbstractLink.html" title="class in org.apache.click.control"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/click/control/AbstractControl.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="AbstractControl.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> |