|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.click.control.AbstractControl
org.apache.click.control.Field
org.apache.click.control.TextField
org.apache.click.extras.control.EmailField
public class EmailField
Provides a Email Field control: <input type='text'>.
Email Field |
Field Summary | |
---|---|
static String |
HTML_IMPORTS
The EmailField.js imports statement. |
protected static String |
VALIDATE_EMAILFIELD_FUNCTION
The field validation JavaScript function template. |
Fields inherited from class org.apache.click.control.TextField |
---|
maxLength, minLength, size, VALIDATE_TEXTFIELD_FUNCTION |
Fields inherited from class org.apache.click.control.Field |
---|
disabled, error, focus, form, help, label, readonly, required, tabindex, title, validate, value |
Fields inherited from class org.apache.click.control.AbstractControl |
---|
actionListener, attributes, headElements, listener, listenerMethod, messages, name, parent, styles |
Fields inherited from interface org.apache.click.Control |
---|
CONTROL_MESSAGES |
Constructor Summary | |
---|---|
EmailField()
Create an Email Field with no name defined. |
|
EmailField(String name)
Construct an Email Field with the given name. |
|
EmailField(String name,
boolean required)
Construct an Email Field with the given name and required status. |
|
EmailField(String name,
String label)
Construct an Email Field with the given name and label. |
|
EmailField(String name,
String label,
boolean required)
Construct an Email Field with the given name, label and required status. |
|
EmailField(String name,
String label,
int size)
Construct the Email Field with the given name, label and size. |
|
EmailField(String name,
String label,
int size,
boolean required)
Construct the Email Field with the given name, label, size and required status. |
Method Summary | |
---|---|
String |
getHtmlImports()
Return the HTML head import statements for the JavaScript (click/extras-control.js) file. |
String |
getValidationJavaScript()
Return the field JavaScript client side validation function. |
void |
onDeploy(ServletContext servletContext)
Deploy the extras-control.js file to the click web directory when the application is initialized. |
void |
validate()
Process the EmailField request submission. |
Methods inherited from class org.apache.click.control.TextField |
---|
getControlSizeEst, getMaxLength, getMinLength, getSize, getTag, getType, render, setMaxLength, setMinLength, setSize |
Methods inherited from class org.apache.click.control.Field |
---|
bindRequestValue, getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getRequestValue, getTabIndex, getTextAlign, getTitle, getValidate, getValue, getValueObject, getWidth, isDisabled, isHidden, isReadonly, isRequired, isValid, onInit, onProcess, setDisabled, setError, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setListener, setParent, setReadonly, setRequired, setTabIndex, setTextAlign, setTitle, setValidate, setValue, setValueObject, setWidth |
Methods inherited from class org.apache.click.control.AbstractControl |
---|
addStyleClass, appendAttributes, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getContext, getHeadElements, getMessage, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasStyles, onDestroy, onRender, removeStyleClass, renderTagBegin, renderTagEnd, setActionListener, setAttribute, setId, setName, setStyle, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String VALIDATE_EMAILFIELD_FUNCTION
public static final String HTML_IMPORTS
Constructor Detail |
---|
public EmailField(String name)
name
- the name of the fieldpublic EmailField(String name, String label)
name
- the name of the fieldlabel
- the label of the fieldpublic EmailField(String name, boolean required)
name
- the name of the fieldrequired
- the field required statuspublic EmailField(String name, String label, boolean required)
name
- the name of the fieldlabel
- the label of the fieldrequired
- the field required statuspublic EmailField(String name, String label, int size)
name
- the name of the fieldlabel
- the label of the fieldsize
- the size of the fieldpublic EmailField(String name, String label, int size, boolean required)
name
- the name of the fieldlabel
- the label of the fieldsize
- the size of the fieldrequired
- the field required statuspublic EmailField()
Method Detail |
---|
public String getHtmlImports()
getHtmlImports
in interface Control
getHtmlImports
in class AbstractControl
Control.getHtmlImports()
public String getValidationJavaScript()
getValidationJavaScript
in class TextField
public void onDeploy(ServletContext servletContext)
onDeploy
in interface Control
onDeploy
in class AbstractControl
servletContext
- the servlet contextControl.onDeploy(ServletContext)
public void validate()
- /click-control.properties
- field-maxlenght-error
- field-minlength-error
- field-required-error
- /org/apache/click/extras/control/EmailField.properties
- email-format-error
validate
in class TextField
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |