<!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> | |
Field (Click Framework API - v2.3.0) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.click.control.Field class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="Field (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/Decorator.html" title="interface in org.apache.click.control"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/click/control/FieldSet.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/Field.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="Field.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 Field</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 "><A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">org.apache.click.control.AbstractControl</A> | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.click.control.Field</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>, <A HREF="../../../../org/apache/click/Stateful.html" title="interface in org.apache.click">Stateful</A></DD> | |
</DL> | |
<DL> | |
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/click/control/Button.html" title="class in org.apache.click.control">Button</A>, <A HREF="../../../../org/apache/click/control/Checkbox.html" title="class in org.apache.click.control">Checkbox</A>, <A HREF="../../../../org/apache/click/control/FieldSet.html" title="class in org.apache.click.control">FieldSet</A>, <A HREF="../../../../org/apache/click/control/FileField.html" title="class in org.apache.click.control">FileField</A>, <A HREF="../../../../org/apache/click/control/HiddenField.html" title="class in org.apache.click.control">HiddenField</A>, <A HREF="../../../../org/apache/click/control/Label.html" title="class in org.apache.click.control">Label</A>, <A HREF="../../../../org/apache/click/control/Radio.html" title="class in org.apache.click.control">Radio</A>, <A HREF="../../../../org/apache/click/control/RadioGroup.html" title="class in org.apache.click.control">RadioGroup</A>, <A HREF="../../../../org/apache/click/control/Select.html" title="class in org.apache.click.control">Select</A>, <A HREF="../../../../org/apache/click/control/TextArea.html" title="class in org.apache.click.control">TextArea</A>, <A HREF="../../../../org/apache/click/control/TextField.html" title="class in org.apache.click.control">TextField</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public abstract class <B>Field</B><DT>extends <A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</A><DT>implements <A HREF="../../../../org/apache/click/Stateful.html" title="interface in org.apache.click">Stateful</A></DL> | |
</PRE> | |
<P> | |
Provides an abstract form Field control. Field controls are contained by | |
the <A HREF="../../../../org/apache/click/control/Form.html" title="class in org.apache.click.control"><CODE>Form</CODE></A> control which will orchestrate the processing and | |
rendering of the contained fields. All Form field controls must extend this | |
abstract class. | |
<h3><a name="field-processing"></a>Field Processing</h3> | |
<h4><a name="post-requests"></a>Post Requests</h4> | |
When processing POST requests forms typically invoke the <A HREF="../../../../org/apache/click/control/Field.html#onProcess()"><CODE>onProcess()</CODE></A> | |
method on all its fields. The Field <tt>onProcess()</tt> method is used | |
to bind the fields request value, validate the submission and invoke any | |
control listener method. If the <tt>onProcess()</tt> method returns true | |
the form will continue processing fields, otherwise the form will abort | |
further processing. | |
<p/> | |
The body of the Field <tt>onProcess()</tt> method is detailed below. | |
<pre class="codeJava"> | |
<span class="kw">public boolean</span> onProcess() { | |
bindRequestValue(); | |
<span class="kw">if</span> (getValidate()) { | |
validate(); | |
} | |
registerActionEvent(); | |
<span class="kw">return true</span>; | |
} </pre> | |
The Field methods called by <tt>onProcess()</tt> include: | |
<dl> | |
<dt><A HREF="../../../../org/apache/click/control/Field.html#bindRequestValue()"><CODE>bindRequestValue()</CODE></A></dt> | |
<dd>This method will bind the HTTP request value to the Field's value. | |
</dd> | |
<dt><A HREF="../../../../org/apache/click/control/Field.html#getValidate()"><CODE>getValidate()</CODE></A></dt> | |
<dd>This method will return true if the Field should validate itself. This | |
value is generally inherited from the parent Form, however the Field can | |
override this value and specify whether it should be validated. | |
</dd> | |
<dt><A HREF="../../../../org/apache/click/control/Field.html#validate()"><CODE>validate()</CODE></A></dt> | |
<dd>This method will validate the submitted Field value. If the submitted | |
value is not valid this method should set the Field <A HREF="../../../../org/apache/click/control/Field.html#error"><CODE>error</CODE></A> property, | |
which can be rendered by the Form. | |
</dd> | |
<dt><A HREF="../../../../org/apache/click/control/AbstractControl.html#dispatchActionEvent()"><CODE>AbstractControl.dispatchActionEvent()</CODE></A></dt> | |
<dd>This method will register any Control action listener method which has be | |
defined for the Field. | |
</dd> | |
</dl> | |
Field subclasses generally only have to override the <tt>validate()</tt> | |
method, and possibly the <tt>bindRequestValue()</tt> method, to provide their | |
own behaviour. | |
<h4><a name="get-requests"></a>Get Requests</h4> | |
When processing GET requests a Page's Form will typically perform no | |
processing and simply render itself and its Fields. | |
<h3><a name="rendering"></a>Rendering</h3> | |
Field subclasses must override the <A HREF="../../../../org/apache/click/control/AbstractControl.html#render(org.apache.click.util.HtmlStringBuffer)"><CODE>AbstractControl.render(org.apache.click.util.HtmlStringBuffer)</CODE></A> | |
method to enable themselves to be rendered as HTML. With the increasing use of | |
AJAX, Fields should render themselves as valid XHTML, so that they may be parsed | |
correctly and used as the <tt>innerHtml</tt> in the DOM. | |
<p/> | |
When a Form object renders a Field using autolayout, it renders the | |
Field in a table row using the Field's <A HREF="../../../../org/apache/click/control/Field.html#label"><CODE>label</CODE></A> attribute, its | |
<A HREF="../../../../org/apache/click/control/Field.html#error"><CODE>error</CODE></A> attribute if defined, and the Fields | |
<A HREF="../../../../org/apache/click/control/AbstractControl.html#render(org.apache.click.util.HtmlStringBuffer)"><CODE>AbstractControl.render(org.apache.click.util.HtmlStringBuffer)</CODE></A> method. | |
<p/> | |
To assist with rendering valid HTML Field subclasses can use the | |
<A HREF="../../../../org/apache/click/util/HtmlStringBuffer.html" title="class in org.apache.click.util"><CODE>HtmlStringBuffer</CODE></A> class. | |
<h3><a name="message-resources"></a>Message Resources and Internationalization (i18n)</h3> | |
Fields support a hierarchy of resource bundles for displaying validation | |
error messages and display 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>AbstractControl.getMessage(String)</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessage(java.lang.String, java.lang.Object...)"><CODE>AbstractControl.getMessage(String, Object...)</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessages()"><CODE>AbstractControl.getMessages()</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#setErrorMessage(java.lang.String)"><CODE>setErrorMessage(String)</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#setErrorMessage(java.lang.String, T)"><CODE>setErrorMessage(String, Object)</CODE></A></li> | |
</ul> | |
Fields automatically pick up localized messages where applicable. Please see | |
the following methods on how to customize these messages: | |
<ul> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#getLabel()"><CODE>getLabel()</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#getTitle()"><CODE>getTitle()</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#getHelp()"><CODE>getHelp()</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#setErrorMessage(java.lang.String)"><CODE>setErrorMessage(String)</CODE></A></li> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#setErrorMessage(java.lang.String, T)"><CODE>setErrorMessage(String, Object)</CODE></A></li> | |
</ul> | |
<a name="message-resolve-order" href="#"></a> | |
The order in which localized messages resolve are: | |
<dl> | |
<dt style="font-weight:bold">Page scope messages</dt> | |
<dd>Message lookups are first resolved to the Pages message bundle if it | |
exists. For example a <tt>Login</tt> page may define the message properties: | |
<pre class="codeConfig"> | |
/com/mycorp/page/Login.properties </pre> | |
If you want messages to be used only for a specific Page, this is where | |
to place them. | |
</dd> | |
<dt style="font-weight:bold;margin-top:1em;">Global page scope messages</dt> | |
<dd>Next message lookups are resolved to the global pages message bundle if it | |
exists. | |
<pre class="codeConfig"> | |
/click-page.properties </pre> | |
If you want messages to be used across your entire application this is where | |
to place them. | |
</dd> | |
<dt style="font-weight:bold">Control scope messages</dt> | |
<dd>Next message lookups are resolved to the Control message bundle if it | |
exists. For example a <tt>CustomTextField</tt> control may define the | |
message properties: | |
<pre class="codeConfig"> | |
/com/mycorp/control/CustomTextField.properties </pre> | |
</dd> | |
<dt style="font-weight:bold">Global control scope messages</dt> | |
<dd>Finally message lookups are resolved to the global application control | |
message bundle if the message has not already found. The global control | |
properties file is: | |
<pre class="codeConfig"> | |
/click-control.properties </pre> | |
You can modify these properties by copying this file into your applications | |
root class path and editing these properties. | |
<p/> | |
Note when customizing the message properties you must include all the | |
properties, not just the ones you want to override. | |
</dd> | |
</dl> | |
<P> | |
<P> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.apache.click.control.Field">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 boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#disabled">disabled</A></B></CODE> | |
<BR> | |
The Field disabled value.</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/Field.html#error">error</A></B></CODE> | |
<BR> | |
The Field error message.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#focus">focus</A></B></CODE> | |
<BR> | |
The request focus flag.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="../../../../org/apache/click/control/Form.html" title="class in org.apache.click.control">Form</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#form">form</A></B></CODE> | |
<BR> | |
The parent Form.</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/Field.html#help">help</A></B></CODE> | |
<BR> | |
The Field help text.</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/Field.html#label">label</A></B></CODE> | |
<BR> | |
The Field label.</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/Field.html#labelStyle">labelStyle</A></B></CODE> | |
<BR> | |
The field label "style" attribute value.</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/Field.html#labelStyleClass">labelStyleClass</A></B></CODE> | |
<BR> | |
The field label "class" attribute value.</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/Field.html#parentStyleClassHint">parentStyleClassHint</A></B></CODE> | |
<BR> | |
The field's parent element "class" attribute hint.</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/Field.html#parentStyleHint">parentStyleHint</A></B></CODE> | |
<BR> | |
The field's parent element "style" attribute hint.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#readonly">readonly</A></B></CODE> | |
<BR> | |
The Field is readonly flag.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#required">required</A></B></CODE> | |
<BR> | |
The Field is required flag.</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/Field.html#tabindex">tabindex</A></B></CODE> | |
<BR> | |
The Field 'tabindex' attribute.</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/Field.html#title">title</A></B></CODE> | |
<BR> | |
The Field 'title' attribute, which acts as a tooltip help message.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#trim">trim</A></B></CODE> | |
<BR> | |
The Field is trimmed flag, default value is true.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html" title="class or interface in java.lang">Boolean</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#validate">validate</A></B></CODE> | |
<BR> | |
The validate Field value <tt>onProcess()</tt> invocation flag.</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/Field.html#value">value</A></B></CODE> | |
<BR> | |
The Field value.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="fields_inherited_from_class_org.apache.click.control.AbstractControl"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Fields inherited from class org.apache.click.control.<A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html#actionListener">actionListener</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#attributes">attributes</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#behaviors">behaviors</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#headElements">headElements</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#listener">listener</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#listenerMethod">listenerMethod</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#messages">messages</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#name">name</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#parent">parent</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#styles">styles</A></CODE></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/Field.html#Field()">Field</A></B>()</CODE> | |
<BR> | |
Construct a new Field object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#Field(java.lang.String)">Field</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> | |
Construct the Field with the given name.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#Field(java.lang.String, java.lang.String)">Field</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> label)</CODE> | |
<BR> | |
Construct the Field with the given name and label.</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/Field.html#bindRequestValue()">bindRequestValue</A></B>()</CODE> | |
<BR> | |
This method binds the submitted request value to the Field's value.</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/Field.html#getError()">getError</A></B>()</CODE> | |
<BR> | |
Return the validation error message if the Field is not valid, or null | |
if valid.</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/Field.html#getErrorLabel()">getErrorLabel</A></B>()</CODE> | |
<BR> | |
Return a normalized label for display in error messages.</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/Field.html#getFocus()">getFocus</A></B>()</CODE> | |
<BR> | |
Return true if the field has requested focus.</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/Field.html#getFocusJavaScript()">getFocusJavaScript</A></B>()</CODE> | |
<BR> | |
Return the Field focus JavaScript.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../org/apache/click/control/Form.html" title="class in org.apache.click.control">Form</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#getForm()">getForm</A></B>()</CODE> | |
<BR> | |
Return the parent Form containing the Field or null if no form is present | |
in the parent hierarchy.</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/Field.html#getHelp()">getHelp</A></B>()</CODE> | |
<BR> | |
Return the field help text.</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/Field.html#getId()">getId</A></B>()</CODE> | |
<BR> | |
Return the Form and Field id appended: "<tt>form-field</tt>" | |
<p/> | |
Use the field the "id" attribute value if defined, or the 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/Field.html#getLabel()">getLabel</A></B>()</CODE> | |
<BR> | |
Return the field display label.</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/Field.html#getLabelStyle()">getLabelStyle</A></B>()</CODE> | |
<BR> | |
Return the field label "style" attribute value.</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/Field.html#getLabelStyleClass()">getLabelStyleClass</A></B>()</CODE> | |
<BR> | |
Return the field label "class" attribute value.</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/Field.html#getParentStyleClassHint()">getParentStyleClassHint</A></B>()</CODE> | |
<BR> | |
Return the field's parent "class" attribute hint.</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/Field.html#getParentStyleHint()">getParentStyleHint</A></B>()</CODE> | |
<BR> | |
Return the field's parent "style" attribute hint.</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/Field.html#getRequestValue()">getRequestValue</A></B>()</CODE> | |
<BR> | |
Return the field's value from the request.</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/Field.html#getState()">getState</A></B>()</CODE> | |
<BR> | |
Return the Field state.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#getTabIndex()">getTabIndex</A></B>()</CODE> | |
<BR> | |
Return the field "tabindex" attribute value.</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/Field.html#getTextAlign()">getTextAlign</A></B>()</CODE> | |
<BR> | |
Return the field CSS "text-align" style, 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/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#getTitle()">getTitle</A></B>()</CODE> | |
<BR> | |
Return the 'title' attribute, or null if not defined.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#getValidate()">getValidate</A></B>()</CODE> | |
<BR> | |
Return true if the Field should validate itself when being processed.</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/Field.html#getValidationJavaScript()">getValidationJavaScript</A></B>()</CODE> | |
<BR> | |
Return the field JavaScript client side validation function.</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/Field.html#getValue()">getValue</A></B>()</CODE> | |
<BR> | |
Return the Field value.</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/Field.html#getValueObject()">getValueObject</A></B>()</CODE> | |
<BR> | |
Return the object representation of the Field value.</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/Field.html#getWidth()">getWidth</A></B>()</CODE> | |
<BR> | |
Return the width CSS "width" style, or null if not defined.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#isDisabled()">isDisabled</A></B>()</CODE> | |
<BR> | |
Return true if the Field is disabled.</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/Field.html#isHidden()">isHidden</A></B>()</CODE> | |
<BR> | |
Return true if the Field type is hidden (<input type="hidden"/>) 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/Field.html#isReadonly()">isReadonly</A></B>()</CODE> | |
<BR> | |
Return true if the Field is a readonly.</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/Field.html#isRequired()">isRequired</A></B>()</CODE> | |
<BR> | |
Return true if the Field's value is required.</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/Field.html#isTrim()">isTrim</A></B>()</CODE> | |
<BR> | |
Return true if the Field request value should be trimmed, 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/Field.html#isValid()">isValid</A></B>()</CODE> | |
<BR> | |
Return true if the Field is valid after being processed, 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/Field.html#onProcess()">onProcess</A></B>()</CODE> | |
<BR> | |
This method processes the page request returning true to continue | |
processing or false 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/Field.html#removeState(org.apache.click.Context)">removeState</A></B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</CODE> | |
<BR> | |
Remove the Field state from the session for the given request context.</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/Field.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 Field tag and common attributes including <A HREF="../../../../org/apache/click/control/AbstractControl.html#getName()"><CODE>name</CODE></A>, | |
<A HREF="../../../../org/apache/click/control/Field.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> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#restoreState(org.apache.click.Context)">restoreState</A></B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</CODE> | |
<BR> | |
Restore the Field state from the session for the given request context.</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/Field.html#saveState(org.apache.click.Context)">saveState</A></B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</CODE> | |
<BR> | |
Save the Field state to the session for the given request context.</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/Field.html#setDisabled(boolean)">setDisabled</A></B>(boolean disabled)</CODE> | |
<BR> | |
Set the Field disabled flag.</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/Field.html#setError(java.lang.String)">setError</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> error)</CODE> | |
<BR> | |
Set the Field validation error message.</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/Field.html#setErrorMessage(java.lang.String)">setErrorMessage</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> key)</CODE> | |
<BR> | |
Set the error with the a label formatted message specified by the given | |
message bundle key.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> | |
<TR ALIGN="right" VALIGN=""> | |
<TD NOWRAP><FONT SIZE="-1"> | |
<CODE><T> void</CODE></FONT></TD> | |
</TR> | |
</TABLE> | |
</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#setErrorMessage(java.lang.String, T)">setErrorMessage</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> key, | |
T value)</CODE> | |
<BR> | |
Set the error with the a label and value formatted message specified by | |
the given message bundle key.</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/Field.html#setFocus(boolean)">setFocus</A></B>(boolean focus)</CODE> | |
<BR> | |
Set the Field request focus flag.</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/Field.html#setForm(org.apache.click.control.Form)">setForm</A></B>(<A HREF="../../../../org/apache/click/control/Form.html" title="class in org.apache.click.control">Form</A> form)</CODE> | |
<BR> | |
Set the Field's the parent <tt>Form</tt>.</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/Field.html#setHelp(java.lang.String)">setHelp</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> help)</CODE> | |
<BR> | |
Set the Field help text.</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/Field.html#setLabel(java.lang.String)">setLabel</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> label)</CODE> | |
<BR> | |
Set the Field display caption.</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/Field.html#setLabelStyle(java.lang.String)">setLabelStyle</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the field label "style" attribute 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/Field.html#setLabelStyleClass(java.lang.String)">setLabelStyleClass</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the field label "class" attribute 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/Field.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> | |
The callback listener will only be called during processing if the Field | |
value is valid.</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/Field.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 Field.</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/Field.html#setParentStyleClassHint(java.lang.String)">setParentStyleClassHint</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> styleClassHint)</CODE> | |
<BR> | |
Set the field's parent "class" attribute hint.</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/Field.html#setParentStyleHint(java.lang.String)">setParentStyleHint</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> styleHint)</CODE> | |
<BR> | |
Set the field's parent "style" attribute hint.</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/Field.html#setReadonly(boolean)">setReadonly</A></B>(boolean readonly)</CODE> | |
<BR> | |
Set the Field readonly flag.</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/Field.html#setRequired(boolean)">setRequired</A></B>(boolean required)</CODE> | |
<BR> | |
Set the Field required status.</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/Field.html#setState(java.lang.Object)">setState</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> state)</CODE> | |
<BR> | |
Set the Field state.</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/Field.html#setTabIndex(int)">setTabIndex</A></B>(int tabindex)</CODE> | |
<BR> | |
Set the field "tabindex" attribute 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/Field.html#setTextAlign(java.lang.String)">setTextAlign</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> align)</CODE> | |
<BR> | |
Set the field CSS horizontal "text-align" style.</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/Field.html#setTitle(java.lang.String)">setTitle</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the 'title' attribute tooltip message.</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/Field.html#setTrim(boolean)">setTrim</A></B>(boolean trim)</CODE> | |
<BR> | |
Set the trim flag to true if the Field request value should be trimmed, | |
false 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/Field.html#setValidate(boolean)">setValidate</A></B>(boolean validate)</CODE> | |
<BR> | |
Set the validate Field value when being processed flag.</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/Field.html#setValue(java.lang.String)">setValue</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the Field 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/Field.html#setValueObject(java.lang.Object)">setValueObject</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> object)</CODE> | |
<BR> | |
Set the value of the field using the given object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/click/control/Field.html#setWidth(java.lang.String)">setWidth</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</CODE> | |
<BR> | |
Set the the CSS "width" style 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/Field.html#validate()">validate</A></B>()</CODE> | |
<BR> | |
The validate method is invoked by <tt>onProcess()</tt> to validate | |
the request submission.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_org.apache.click.control.AbstractControl"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class org.apache.click.control.<A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html#addBehavior(org.apache.click.Behavior)">addBehavior</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#addStyleClass(java.lang.String)">addStyleClass</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#appendAttributes(org.apache.click.util.HtmlStringBuffer)">appendAttributes</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#dispatchActionEvent()">dispatchActionEvent</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getActionListener()">getActionListener</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getAttribute(java.lang.String)">getAttribute</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getAttributes()">getAttributes</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getBehaviors()">getBehaviors</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getContext()">getContext</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getControlSizeEst()">getControlSizeEst</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getHeadElements()">getHeadElements</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getHtmlImports()">getHtmlImports</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessage(java.lang.String)">getMessage</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessage(java.lang.String, java.lang.Object...)">getMessage</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getMessages()">getMessages</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getName()">getName</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getPage()">getPage</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getParent()">getParent</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getStyle(java.lang.String)">getStyle</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getStyles()">getStyles</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#getTag()">getTag</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#hasAttribute(java.lang.String)">hasAttribute</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#hasAttributes()">hasAttributes</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#hasBehaviors()">hasBehaviors</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#hasStyles()">hasStyles</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#isAjaxTarget(org.apache.click.Context)">isAjaxTarget</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#onDeploy(javax.servlet.ServletContext)">onDeploy</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#onDestroy()">onDestroy</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#onInit()">onInit</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#onRender()">onRender</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#removeBehavior(org.apache.click.Behavior)">removeBehavior</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#removeStyleClass(java.lang.String)">removeStyleClass</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#render(org.apache.click.util.HtmlStringBuffer)">render</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#renderTagEnd(java.lang.String, org.apache.click.util.HtmlStringBuffer)">renderTagEnd</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#setActionListener(org.apache.click.ActionListener)">setActionListener</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#setAttribute(java.lang.String, java.lang.String)">setAttribute</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#setId(java.lang.String)">setId</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#setName(java.lang.String)">setName</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#setStyle(java.lang.String, java.lang.String)">setStyle</A>, <A HREF="../../../../org/apache/click/control/AbstractControl.html#toString()">toString</A></CODE></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="disabled"><!-- --></A><H3> | |
disabled</H3> | |
<PRE> | |
protected boolean <B>disabled</B></PRE> | |
<DL> | |
<DD>The Field disabled value. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="error"><!-- --></A><H3> | |
error</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>error</B></PRE> | |
<DL> | |
<DD>The Field error message. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="focus"><!-- --></A><H3> | |
focus</H3> | |
<PRE> | |
protected boolean <B>focus</B></PRE> | |
<DL> | |
<DD>The request focus flag. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="form"><!-- --></A><H3> | |
form</H3> | |
<PRE> | |
protected <A HREF="../../../../org/apache/click/control/Form.html" title="class in org.apache.click.control">Form</A> <B>form</B></PRE> | |
<DL> | |
<DD>The parent Form. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="help"><!-- --></A><H3> | |
help</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>help</B></PRE> | |
<DL> | |
<DD>The Field help text. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="label"><!-- --></A><H3> | |
label</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>label</B></PRE> | |
<DL> | |
<DD>The Field label. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="labelStyle"><!-- --></A><H3> | |
labelStyle</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>labelStyle</B></PRE> | |
<DL> | |
<DD>The field label "style" attribute value. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="labelStyleClass"><!-- --></A><H3> | |
labelStyleClass</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>labelStyleClass</B></PRE> | |
<DL> | |
<DD>The field label "class" attribute value. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="parentStyleHint"><!-- --></A><H3> | |
parentStyleHint</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>parentStyleHint</B></PRE> | |
<DL> | |
<DD>The field's parent element "style" attribute hint. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="parentStyleClassHint"><!-- --></A><H3> | |
parentStyleClassHint</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>parentStyleClassHint</B></PRE> | |
<DL> | |
<DD>The field's parent element "class" attribute hint. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="readonly"><!-- --></A><H3> | |
readonly</H3> | |
<PRE> | |
protected boolean <B>readonly</B></PRE> | |
<DL> | |
<DD>The Field is readonly flag. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="required"><!-- --></A><H3> | |
required</H3> | |
<PRE> | |
protected boolean <B>required</B></PRE> | |
<DL> | |
<DD>The Field is required flag. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="tabindex"><!-- --></A><H3> | |
tabindex</H3> | |
<PRE> | |
protected int <B>tabindex</B></PRE> | |
<DL> | |
<DD>The Field 'tabindex' attribute. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="title"><!-- --></A><H3> | |
title</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>title</B></PRE> | |
<DL> | |
<DD>The Field 'title' attribute, which acts as a tooltip help message. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="trim"><!-- --></A><H3> | |
trim</H3> | |
<PRE> | |
protected boolean <B>trim</B></PRE> | |
<DL> | |
<DD>The Field is trimmed flag, default value is true. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="validate"><!-- --></A><H3> | |
validate</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html" title="class or interface in java.lang">Boolean</A> <B>validate</B></PRE> | |
<DL> | |
<DD>The validate Field value <tt>onProcess()</tt> invocation flag. | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="value"><!-- --></A><H3> | |
value</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>value</B></PRE> | |
<DL> | |
<DD>The Field value. | |
<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="Field()"><!-- --></A><H3> | |
Field</H3> | |
<PRE> | |
public <B>Field</B>()</PRE> | |
<DL> | |
<DD>Construct a new Field object. | |
<P> | |
</DL> | |
<HR> | |
<A NAME="Field(java.lang.String)"><!-- --></A><H3> | |
Field</H3> | |
<PRE> | |
public <B>Field</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>Construct the Field with the given name. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the Field</DL> | |
</DL> | |
<HR> | |
<A NAME="Field(java.lang.String, java.lang.String)"><!-- --></A><H3> | |
Field</H3> | |
<PRE> | |
public <B>Field</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> label)</PRE> | |
<DL> | |
<DD>Construct the Field with the given name and label. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the Field<DD><CODE>label</CODE> - the label of the Field</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="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>Set the parent of the Field. | |
<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><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html#setParent(java.lang.Object)">setParent</A></CODE> in class <CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</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/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if <A HREF="../../../../org/apache/click/control/AbstractControl.html#name"><CODE>AbstractControl.name</CODE></A> is not defined | |
<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="isDisabled()"><!-- --></A><H3> | |
isDisabled</H3> | |
<PRE> | |
public boolean <B>isDisabled</B>()</PRE> | |
<DL> | |
<DD>Return true if the Field is disabled. The Field will also be disabled | |
if the parent FieldSet or Form is disabled. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Field is disabled<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#setDisabled(boolean)"><CODE>setDisabled(boolean)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setDisabled(boolean)"><!-- --></A><H3> | |
setDisabled</H3> | |
<PRE> | |
public void <B>setDisabled</B>(boolean disabled)</PRE> | |
<DL> | |
<DD>Set the Field disabled flag. Disabled fields are not processed nor | |
validated and their action event is not fired. | |
<p/> | |
<b>Important Note</b>: an HTML form POST does not submit disabled fields | |
values. Similarly disabled Click fields do not get processed or validated. | |
However, JavaScript is often used to <tt>enable</tt> fields prior to | |
submission. Click is smart enough to recognize when a field was enabled | |
this way by checking if the field has an incoming request parameter. | |
If a field is disabled but has an incoming request parameter, Click will | |
<tt>"enable"</tt> the field and process it. | |
<p/> | |
<b>Caveat</b>: Unfortunately the above behavior does not apply to | |
<A HREF="../../../../org/apache/click/control/Checkbox.html" title="class in org.apache.click.control"><CODE>Checkbox</CODE></A> and <A HREF="../../../../org/apache/click/control/Radio.html" title="class in org.apache.click.control"><CODE>Radio</CODE></A> buttons. An HTML form POST for a | |
<tt>disabled</tt> checkbox/radio is the same as for an <tt>unchecked</tt> | |
checkbox/radio. In neither case is a value submitted to the server and | |
Click cannot make the distinction whether the checkbox/radio is disabled | |
or unchecked. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>disabled</CODE> - the Field disabled flag</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getError()"><!-- --></A><H3> | |
getError</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>getError</B>()</PRE> | |
<DL> | |
<DD>Return the validation error message if the Field is not valid, or null | |
if valid. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Field validation error message, or null if valid</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setError(java.lang.String)"><!-- --></A><H3> | |
setError</H3> | |
<PRE> | |
public void <B>setError</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> error)</PRE> | |
<DL> | |
<DD>Set the Field validation error message. If the error message is not null | |
the Field is invalid, otherwise it is valid. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>error</CODE> - the validation error message</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getFocus()"><!-- --></A><H3> | |
getFocus</H3> | |
<PRE> | |
public boolean <B>getFocus</B>()</PRE> | |
<DL> | |
<DD>Return true if the field has requested focus. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the field has requested focus</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setFocus(boolean)"><!-- --></A><H3> | |
setFocus</H3> | |
<PRE> | |
public void <B>setFocus</B>(boolean focus)</PRE> | |
<DL> | |
<DD>Set the Field request focus flag. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>focus</CODE> - the request focus flag</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getFocusJavaScript()"><!-- --></A><H3> | |
getFocusJavaScript</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>getFocusJavaScript</B>()</PRE> | |
<DL> | |
<DD>Return the Field focus JavaScript. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Field focus JavaScript</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getForm()"><!-- --></A><H3> | |
getForm</H3> | |
<PRE> | |
public <A HREF="../../../../org/apache/click/control/Form.html" title="class in org.apache.click.control">Form</A> <B>getForm</B>()</PRE> | |
<DL> | |
<DD>Return the parent Form containing the Field or null if no form is present | |
in the parent hierarchy. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the parent Form containing the Field</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setForm(org.apache.click.control.Form)"><!-- --></A><H3> | |
setForm</H3> | |
<PRE> | |
public void <B>setForm</B>(<A HREF="../../../../org/apache/click/control/Form.html" title="class in org.apache.click.control">Form</A> form)</PRE> | |
<DL> | |
<DD>Set the Field's the parent <tt>Form</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>form</CODE> - Field's parent <tt>Form</tt></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getHelp()"><!-- --></A><H3> | |
getHelp</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>getHelp</B>()</PRE> | |
<DL> | |
<DD>Return the field help text. | |
<p/> | |
If the help value is null, this method will attempt to find a | |
localized help message in the parent messages using the key: | |
<blockquote> | |
<tt>getName() + ".help"</tt> | |
</blockquote> | |
If not found then the message will be looked up in the | |
<tt>/click-control.properties</tt> file using the same key. | |
<p/> | |
For example given a <tt>CustomerPage</tt> with the properties file | |
<tt>CustomerPage.properties</tt>: | |
<pre class="codeConfig"> | |
<span class="st">name</span>.label=<span class="red">Customer Name</span> | |
<span class="st">name</span>.help=<span class="red">Full name or Business name</span> </pre> | |
The page TextField code: | |
<pre class="codeJava"> | |
<span class="kw">public class</span> CustomerPage <span class="kw">extends</span> Page { | |
TextField nameField = <span class="kw">new</span> TextField(<span class="st">"name"</span>); | |
.. | |
} </pre> | |
Will render the TextField label and title properties as: | |
<pre class="codeHtml"> | |
<td><label><span class="red">Customer Name</span></label></td> | |
<td><input type="text" name="<span class="st">name</span>"/> <span="<span class="red">Full name or Business name</span>"/>/td> </pre> | |
How the help text is rendered is depends upon the Field subclass. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the help text of the Field</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setHelp(java.lang.String)"><!-- --></A><H3> | |
setHelp</H3> | |
<PRE> | |
public void <B>setHelp</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> help)</PRE> | |
<DL> | |
<DD>Set the Field help text. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>help</CODE> - the help text of the Field</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isHidden()"><!-- --></A><H3> | |
isHidden</H3> | |
<PRE> | |
public boolean <B>isHidden</B>()</PRE> | |
<DL> | |
<DD>Return true if the Field type is hidden (<input type="hidden"/>) or | |
false otherwise. By default this method returns false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>false</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 Form and Field id appended: "<tt>form-field</tt>" | |
<p/> | |
Use the field the "id" attribute value if defined, or the 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><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html#getId()">getId</A></CODE> in class <CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</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="getLabel()"><!-- --></A><H3> | |
getLabel</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>getLabel</B>()</PRE> | |
<DL> | |
<DD>Return the field display label. | |
<p/> | |
If the label value is null, this method will attempt to find a | |
localized label message in the parent messages using the key: | |
<blockquote> | |
<tt>getName() + ".label"</tt> | |
</blockquote> | |
If not found then the message will be looked up in the | |
<tt>/click-control.properties</tt> file using the same key. | |
If a value is still not found, the Field name will be converted | |
into a label using the method: <A HREF="../../../../org/apache/click/util/ClickUtils.html#toLabel(java.lang.String)"><CODE>ClickUtils.toLabel(String)</CODE></A> | |
<p/> | |
For example given a <tt>CustomerPage</tt> with the properties file | |
<tt>CustomerPage.properties</tt>: | |
<pre class="codeConfig"> | |
<span class="st">name</span>.label=<span class="red">Customer Name</span> | |
<span class="st">name</span>.title=<span class="red">Full name or Business name</span> </pre> | |
The page TextField code: | |
<pre class="codeJava"> | |
<span class="kw">public class</span> CustomerPage <span class="kw">extends</span> Page { | |
TextField nameField = <span class="kw">new</span> TextField(<span class="st">"name"</span>); | |
.. | |
} </pre> | |
Will render the TextField label and title properties as: | |
<pre class="codeHtml"> | |
<td><label><span class="red">Customer Name</span></label></td> | |
<td><input type="text" name="<span class="st">name</span>" title="<span class="red">Full name or Business name</span>"/></td> </pre> | |
When a label value is not set, or defined in any properties files, then | |
its value will be created from the Fields name. | |
<p/> | |
For example given the TextField code: | |
<pre class="codeJava"> | |
TextField nameField = <span class="kw">new</span> TextField(<span class="st">"faxNumber"</span>); </pre> | |
Will render the TextField label as: | |
<pre class="codeHtml"> | |
<td><label><span class="red">Fax Number</span></label></td> | |
<td><input type="text" name="<span class="st">faxNumber</span>"/></td> </pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the display label of the Field</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setLabel(java.lang.String)"><!-- --></A><H3> | |
setLabel</H3> | |
<PRE> | |
public void <B>setLabel</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> label)</PRE> | |
<DL> | |
<DD>Set the Field display caption. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>label</CODE> - the display label of the Field</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getLabelStyle()"><!-- --></A><H3> | |
getLabelStyle</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>getLabelStyle</B>()</PRE> | |
<DL> | |
<DD>Return the field label "style" attribute value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field label "style" attribute value<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#setLabelStyle(java.lang.String)"><CODE>setLabelStyle(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setLabelStyle(java.lang.String)"><!-- --></A><H3> | |
setLabelStyle</H3> | |
<PRE> | |
public void <B>setLabelStyle</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the field label "style" attribute value. | |
<p/> | |
<b>Please note</b>: the label is rendered by the containing Form | |
or container, not the field itself. It is up to the parent Form | |
(or container) on how to apply the label style. | |
<p/> | |
<pre class="prettyprint"> | |
nameField.setLabelStyle("color: green; font-weight: bold");</pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the field label "style" attribute value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getLabelStyleClass()"><!-- --></A><H3> | |
getLabelStyleClass</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>getLabelStyleClass</B>()</PRE> | |
<DL> | |
<DD>Return the field label "class" attribute value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field label "class" attribute value<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#setLabelStyleClass(java.lang.String)"><CODE>setLabelStyleClass(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setLabelStyleClass(java.lang.String)"><!-- --></A><H3> | |
setLabelStyleClass</H3> | |
<PRE> | |
public void <B>setLabelStyleClass</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the field label "class" attribute value. | |
<p/> | |
<b>Please note</b>: the label is rendered by the containing Form | |
or container, not the field itself. It is up to the parent Form | |
(or container) on how to apply the label style class. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the field label "class" attribute value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getParentStyleHint()"><!-- --></A><H3> | |
getParentStyleHint</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>getParentStyleHint</B>()</PRE> | |
<DL> | |
<DD>Return the field's parent "style" attribute hint. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field's parent "style" attribute hint<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#setParentStyleHint(java.lang.String)"><CODE>setParentStyleHint(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setParentStyleHint(java.lang.String)"><!-- --></A><H3> | |
setParentStyleHint</H3> | |
<PRE> | |
public void <B>setParentStyleHint</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> styleHint)</PRE> | |
<DL> | |
<DD>Set the field's parent "style" attribute hint. | |
<p/> | |
<pre class="prettyprint"> | |
nameField.setParentStyleHint("margin-bottom; 10px");</pre> | |
<b>Please note:</b>The field's parent style provides a hint to Forms | |
(or other containers) what style to render, but it is up to the | |
Form (or container) implementation how the style will be applied. | |
For example, Form will render the parent style on the table cells | |
containing the field and label. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>styleHint</CODE> - the field's parent "style" attribute hint</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getParentStyleClassHint()"><!-- --></A><H3> | |
getParentStyleClassHint</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>getParentStyleClassHint</B>()</PRE> | |
<DL> | |
<DD>Return the field's parent "class" attribute hint. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field's parent "class" attribute hint<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#setParentStyleClassHint(java.lang.String)"><CODE>setParentStyleClassHint(java.lang.String)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setParentStyleClassHint(java.lang.String)"><!-- --></A><H3> | |
setParentStyleClassHint</H3> | |
<PRE> | |
public void <B>setParentStyleClassHint</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> styleClassHint)</PRE> | |
<DL> | |
<DD>Set the field's parent "class" attribute hint. | |
<p/> | |
<b>Please note:</b>The parent style class provides a hint to Forms | |
(or other containers) which CSS class to render, but it is up to the | |
Form (or container) implementation how the style class will be applied. | |
For example, Form will render the parent style class on the table cells | |
containing the field and label. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>styleClassHint</CODE> - the field parent "class" attribute hint</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>The callback listener will only be called during processing if the Field | |
value is valid. If the field has validation errors the listener will not | |
be called. | |
<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><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html#setListener(java.lang.Object, java.lang.String)">setListener</A></CODE> in class <CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</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<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="isReadonly()"><!-- --></A><H3> | |
isReadonly</H3> | |
<PRE> | |
public boolean <B>isReadonly</B>()</PRE> | |
<DL> | |
<DD>Return true if the Field is a readonly. The Field will also be readonly | |
if the parent FieldSet or Form is readonly. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Field is a readonly</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setReadonly(boolean)"><!-- --></A><H3> | |
setReadonly</H3> | |
<PRE> | |
public void <B>setReadonly</B>(boolean readonly)</PRE> | |
<DL> | |
<DD>Set the Field readonly flag. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>readonly</CODE> - the Field readonly flag</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isRequired()"><!-- --></A><H3> | |
isRequired</H3> | |
<PRE> | |
public boolean <B>isRequired</B>()</PRE> | |
<DL> | |
<DD>Return true if the Field's value is required. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Field's value is required</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRequired(boolean)"><!-- --></A><H3> | |
setRequired</H3> | |
<PRE> | |
public void <B>setRequired</B>(boolean required)</PRE> | |
<DL> | |
<DD>Set the Field required status. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>required</CODE> - set the Field required status</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTabIndex()"><!-- --></A><H3> | |
getTabIndex</H3> | |
<PRE> | |
public int <B>getTabIndex</B>()</PRE> | |
<DL> | |
<DD>Return the field "tabindex" attribute value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field "tabindex" attribute value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTabIndex(int)"><!-- --></A><H3> | |
setTabIndex</H3> | |
<PRE> | |
public void <B>setTabIndex</B>(int tabindex)</PRE> | |
<DL> | |
<DD>Set the field "tabindex" attribute value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>tabindex</CODE> - the field "tabindex" attribute value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTextAlign()"><!-- --></A><H3> | |
getTextAlign</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>getTextAlign</B>()</PRE> | |
<DL> | |
<DD>Return the field CSS "text-align" style, or null if not defined. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field CSS "text-align" style, or null if not defined.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTextAlign(java.lang.String)"><!-- --></A><H3> | |
setTextAlign</H3> | |
<PRE> | |
public void <B>setTextAlign</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> align)</PRE> | |
<DL> | |
<DD>Set the field CSS horizontal "text-align" style. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>align</CODE> - the CSS "text-align" value: <tt>["left", "right", "center"]</tt></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getTitle()"><!-- --></A><H3> | |
getTitle</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>getTitle</B>()</PRE> | |
<DL> | |
<DD>Return the 'title' attribute, or null if not defined. The title | |
attribute acts like tooltip message over the Field. | |
<p/> | |
If the title value is null, this method will attempt to find a | |
localized title message in the parent messages using the key: | |
<blockquote> | |
<tt>getName() + ".title"</tt> | |
</blockquote> | |
If not found then the message will be looked up in the | |
<tt>/click-control.properties</tt> file using the same key. If still | |
not found the title will be left as null and will not be rendered. | |
<p/> | |
For example given a <tt>CustomerPage</tt> with the properties file | |
<tt>CustomerPage.properties</tt>: | |
<pre class="codeConfig"> | |
<span class="st">name</span>.label=<span class="red">Customer Name</span> | |
<span class="st">name</span>.title=<span class="red">Full name or Business name</span> </pre> | |
The page TextField code: | |
<pre class="codeJava"> | |
<span class="kw">public class</span> CustomerPage <span class="kw">extends</span> Page { | |
TextField nameField = <span class="kw">new</span> TextField(<span class="st">"name"</span>); | |
.. | |
} </pre> | |
Will render the TextField label and title properties as: | |
<pre class="codeHtml"> | |
<td><label><span class="red">Customer Name</span></label></td> | |
<td><input type="text" name="<span class="st">name</span>" title="<span class="red">Full name or Business name</span>"/></td> </pre> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the 'title' attribute tooltip message</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTitle(java.lang.String)"><!-- --></A><H3> | |
setTitle</H3> | |
<PRE> | |
public void <B>setTitle</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the 'title' attribute tooltip message. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the 'title' attribute tooltip message</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isTrim()"><!-- --></A><H3> | |
isTrim</H3> | |
<PRE> | |
public boolean <B>isTrim</B>()</PRE> | |
<DL> | |
<DD>Return true if the Field request value should be trimmed, false otherwise. | |
The default value is <tt>"true"</tt>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Field request value should be trimmed, false otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setTrim(boolean)"><!-- --></A><H3> | |
setTrim</H3> | |
<PRE> | |
public void <B>setTrim</B>(boolean trim)</PRE> | |
<DL> | |
<DD>Set the trim flag to true if the Field request value should be trimmed, | |
false otherwise. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>trim</CODE> - true if the Field request value should be trimmed, false | |
otherwise</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getValidate()"><!-- --></A><H3> | |
getValidate</H3> | |
<PRE> | |
public boolean <B>getValidate</B>()</PRE> | |
<DL> | |
<DD>Return true if the Field should validate itself when being processed. | |
<p/> | |
If the validate attribute for the Field is not explicitly set, this | |
method will return the validation status of its parent Form, see | |
<A HREF="../../../../org/apache/click/control/Form.html#getValidate()"><CODE>Form.getValidate()</CODE></A>. If the Field validate attribute is not set | |
and the parent Form is not set this method will return true. | |
<p/> | |
This method is called by the <A HREF="../../../../org/apache/click/control/Field.html#onProcess()"><CODE>onProcess()</CODE></A> method to determine | |
whether the the Field <A HREF="../../../../org/apache/click/control/Field.html#validate()"><CODE>validate()</CODE></A> method should be invoked. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Field should validate itself when being processed.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setValidate(boolean)"><!-- --></A><H3> | |
setValidate</H3> | |
<PRE> | |
public void <B>setValidate</B>(boolean validate)</PRE> | |
<DL> | |
<DD>Set the validate Field value when being processed flag. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>validate</CODE> - the field value when processed</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getValidationJavaScript()"><!-- --></A><H3> | |
getValidationJavaScript</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>getValidationJavaScript</B>()</PRE> | |
<DL> | |
<DD>Return the field JavaScript client side validation function. | |
<p/> | |
The function name must follow the format <tt>validate_[id]</tt>, where | |
the id is the DOM element id of the fields focusable HTML element, to | |
ensure the function has a unique name. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field JavaScript client side validation function</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isValid()"><!-- --></A><H3> | |
isValid</H3> | |
<PRE> | |
public boolean <B>isValid</B>()</PRE> | |
<DL> | |
<DD>Return true if the Field is valid after being processed, or false | |
otherwise. If the Field has no error message after | |
<A HREF="../../../../org/apache/click/Control.html#onProcess()"><CODE>Control.onProcess()</CODE></A> has been invoked it is considered to be | |
valid. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>true if the Field is valid after being processed</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getValue()"><!-- --></A><H3> | |
getValue</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>getValue</B>()</PRE> | |
<DL> | |
<DD>Return the Field value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Field value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setValue(java.lang.String)"><!-- --></A><H3> | |
setValue</H3> | |
<PRE> | |
public void <B>setValue</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the Field value. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the Field value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getValueObject()"><!-- --></A><H3> | |
getValueObject</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>getValueObject</B>()</PRE> | |
<DL> | |
<DD>Return the object representation of the Field value. This method will | |
return a string value, or null if the string value is null or is zero | |
length. | |
<p/> | |
Specialized object field subclasses should override this method to | |
return a non string object. For examples a <tt>DoubleField</tt> would | |
return a <tt>Double</tt> value instead. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the object representation of the Field value</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setValueObject(java.lang.Object)"><!-- --></A><H3> | |
setValueObject</H3> | |
<PRE> | |
public void <B>setValueObject</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> object)</PRE> | |
<DL> | |
<DD>Set the value of the field using the given object. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>object</CODE> - the object value to set</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getWidth()"><!-- --></A><H3> | |
getWidth</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>getWidth</B>()</PRE> | |
<DL> | |
<DD>Return the width CSS "width" style, or null if not defined. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the CSS "width" style attribute, or null if not defined</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setWidth(java.lang.String)"><!-- --></A><H3> | |
setWidth</H3> | |
<PRE> | |
public void <B>setWidth</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value)</PRE> | |
<DL> | |
<DD>Set the the CSS "width" style attribute. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the CSS "width" style attribute</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="bindRequestValue()"><!-- --></A><H3> | |
bindRequestValue</H3> | |
<PRE> | |
public void <B>bindRequestValue</B>()</PRE> | |
<DL> | |
<DD>This method binds the submitted request value to the Field's value. | |
<p/> | |
<b>Please note:</b> while it is possible to explicitly bind the field | |
value by invoking this method directly, it is recommended to use the | |
"<tt>bind</tt>" utility methods in <A HREF="../../../../org/apache/click/util/ClickUtils.html" title="class in org.apache.click.util"><CODE>ClickUtils</CODE></A> | |
instead. See <A HREF="../../../../org/apache/click/util/ClickUtils.html#bind(org.apache.click.control.Field)"><CODE>ClickUtils.bind(org.apache.click.control.Field)</CODE></A> | |
for more details. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getState()"><!-- --></A><H3> | |
getState</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>getState</B>()</PRE> | |
<DL> | |
<DD>Return the Field state. The following state is returned: | |
<ul> | |
<li><A HREF="../../../../org/apache/click/control/Field.html#getValue()"><CODE>field value</CODE></A></li> | |
</ul> | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Stateful.html#getState()">getState</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Stateful.html" title="interface in org.apache.click">Stateful</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the Field state</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setState(java.lang.Object)"><!-- --></A><H3> | |
setState</H3> | |
<PRE> | |
public void <B>setState</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> state)</PRE> | |
<DL> | |
<DD>Set the Field state. | |
<P> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/Stateful.html#setState(java.lang.Object)">setState</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/Stateful.html" title="interface in org.apache.click">Stateful</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>state</CODE> - the Field state to set</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="onProcess()"><!-- --></A><H3> | |
onProcess</H3> | |
<PRE> | |
public boolean <B>onProcess</B>()</PRE> | |
<DL> | |
<DD>This method processes the page request returning true to continue | |
processing or false otherwise. The Field <tt>onProcess()</tt> method is | |
typically invoked by the Form <tt>onProcess()</tt> method when | |
processing POST request. | |
<p/> | |
This method will bind the Field request parameter value to the field, | |
validate the submission and invoke its callback listener if defined. | |
<p/> | |
Below is a typical onProcess implementation: | |
<pre class="codeJava"> | |
<span class="kw">public boolean</span> onProcess() { | |
bindRequestValue(); | |
<span class="kw">if</span> (getValidate()) { | |
validate(); | |
} | |
registerActionEvent(); | |
<span class="kw">return true</span> | |
} </pre> | |
<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><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html#onProcess()">onProcess</A></CODE> in class <CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</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="removeState(org.apache.click.Context)"><!-- --></A><H3> | |
removeState</H3> | |
<PRE> | |
public void <B>removeState</B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</PRE> | |
<DL> | |
<DD>Remove the Field state from the session for the given request context. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the request context<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#saveState(org.apache.click.Context)"><CODE>saveState(org.apache.click.Context)</CODE></A>, | |
<A HREF="../../../../org/apache/click/control/Field.html#restoreState(org.apache.click.Context)"><CODE>restoreState(org.apache.click.Context)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="restoreState(org.apache.click.Context)"><!-- --></A><H3> | |
restoreState</H3> | |
<PRE> | |
public void <B>restoreState</B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</PRE> | |
<DL> | |
<DD>Restore the Field state from the session for the given request context. | |
<p/> | |
This method delegates to <A HREF="../../../../org/apache/click/control/Field.html#setState(java.lang.Object)"><CODE>setState(java.lang.Object)</CODE></A> to set the | |
field restored state. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the request context<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#saveState(org.apache.click.Context)"><CODE>saveState(org.apache.click.Context)</CODE></A>, | |
<A HREF="../../../../org/apache/click/control/Field.html#removeState(org.apache.click.Context)"><CODE>removeState(org.apache.click.Context)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="saveState(org.apache.click.Context)"><!-- --></A><H3> | |
saveState</H3> | |
<PRE> | |
public void <B>saveState</B>(<A HREF="../../../../org/apache/click/Context.html" title="class in org.apache.click">Context</A> context)</PRE> | |
<DL> | |
<DD>Save the Field state to the session for the given request context. | |
<p/> | |
* This method delegates to <A HREF="../../../../org/apache/click/control/Field.html#getState()"><CODE>getState()</CODE></A> to retrieve the field state | |
to save. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the request context<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/Field.html#restoreState(org.apache.click.Context)"><CODE>restoreState(org.apache.click.Context)</CODE></A>, | |
<A HREF="../../../../org/apache/click/control/Field.html#removeState(org.apache.click.Context)"><CODE>removeState(org.apache.click.Context)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="validate()"><!-- --></A><H3> | |
validate</H3> | |
<PRE> | |
public void <B>validate</B>()</PRE> | |
<DL> | |
<DD>The validate method is invoked by <tt>onProcess()</tt> to validate | |
the request submission. Field subclasses should override this method | |
to implement request validation logic. | |
<p/> | |
If the field determines that the submission is invalid it should set the | |
<A HREF="../../../../org/apache/click/control/Field.html#error"><CODE>error</CODE></A> property with the error message. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getErrorLabel()"><!-- --></A><H3> | |
getErrorLabel</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>getErrorLabel</B>()</PRE> | |
<DL> | |
<DD>Return a normalized label for display in error messages. | |
<p/> | |
The error label is a normalized version of <A HREF="../../../../org/apache/click/control/Field.html#getLabel()"><CODE>getLabel()</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>a normalized label for error message display</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setErrorMessage(java.lang.String)"><!-- --></A><H3> | |
setErrorMessage</H3> | |
<PRE> | |
protected void <B>setErrorMessage</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> key)</PRE> | |
<DL> | |
<DD>Set the error with the a label formatted message specified by the given | |
message bundle key. The message will be formatted with the field label | |
using <A HREF="../../../../org/apache/click/control/Field.html#getErrorLabel()"><CODE>getErrorLabel()</CODE></A>. | |
<p/> | |
setErrorMessage will attempt to find a localized error message as | |
described <a href="#message-resolve-order">here</a>, using the following | |
lookup strategy: | |
<ul> | |
<li> | |
an error message is looked up for a specific Field instance by | |
prefixing the <tt>key</tt> with the Field's name: | |
<blockquote> | |
<tt>getMessage(getName() + "." + key);</tt> | |
</blockquote> | |
</li> | |
<li> | |
if no message is found for a specific Field instance, an error | |
message is looked up for the Field class based on the <tt>key</tt>: | |
<blockquote> | |
<tt>getMessage(key);</tt> | |
</blockquote> | |
</li> | |
</ul> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the localized message bundle string</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setErrorMessage(java.lang.String,java.lang.Object)"><!-- --></A><A NAME="setErrorMessage(java.lang.String, T)"><!-- --></A><H3> | |
setErrorMessage</H3> | |
<PRE> | |
protected <T> void <B>setErrorMessage</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> key, | |
T value)</PRE> | |
<DL> | |
<DD>Set the error with the a label and value formatted message specified by | |
the given message bundle key. The message will be formatted with the | |
field label {0} using <A HREF="../../../../org/apache/click/control/Field.html#getErrorLabel()"><CODE>getErrorLabel()</CODE></A> and the given value {1}. | |
<p/> | |
<b>Also see</b> <A HREF="../../../../org/apache/click/control/Field.html#setErrorMessage(java.lang.String)"><CODE>setErrorMessage(java.lang.String)</CODE></A> on how to | |
specify error messages for specific Field instances. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the localized message bundle string<DD><CODE>value</CODE> - the value to format in the message</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRequestValue()"><!-- --></A><H3> | |
getRequestValue</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>getRequestValue</B>()</PRE> | |
<DL> | |
<DD>Return the field's value from the request. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>the field's value from the request</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 Field tag and common attributes including <A HREF="../../../../org/apache/click/control/AbstractControl.html#getName()"><CODE>name</CODE></A>, | |
<A HREF="../../../../org/apache/click/control/Field.html#getId()"><CODE>id</CODE></A>, <tt>class</tt> and <tt>style</tt>. | |
<P> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html#renderTagBegin(java.lang.String, org.apache.click.util.HtmlStringBuffer)">renderTagBegin</A></CODE> in class <CODE><A HREF="../../../../org/apache/click/control/AbstractControl.html" title="class in org.apache.click.control">AbstractControl</A></CODE></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<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/control/AbstractControl.html#renderTagBegin(java.lang.String, org.apache.click.util.HtmlStringBuffer)"><CODE>AbstractControl.renderTagBegin(java.lang.String, org.apache.click.util.HtmlStringBuffer)</CODE></A></DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../org/apache/click/control/Decorator.html" title="interface in org.apache.click.control"><B>PREV CLASS</B></A> | |
<A HREF="../../../../org/apache/click/control/FieldSet.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/Field.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="Field.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> |