www.element4solution.com

e4s.html.input.extended
Class TEXTFIELD

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.E4HtmlObject
          extended by e4s.html.E4HtmlElementGeneral
              extended by e4s.html.input.extended.E4FieldsetLayout
                  extended by e4s.html.input.extended.E4InputField
                      extended by e4s.html.input.extended.TEXTFIELD
All Implemented Interfaces:
E4FieldsetLayout_Intf, E4HtmlElement_Intf, E4InputField_Intf
Direct Known Subclasses:
FILESELECTION, FILEUPLOAD, PASSWORDFIELD, TEXTAREA

public class TEXTFIELD
extends E4InputField
implements E4InputField_Intf

An input field (for <FORM>) elements representing a single line text input value.

Example_InputForm.java

Since:
JDK 1.4
See Also:
TEXTAREA, DATEFIELD, LONGFIELD, FLOATFIELD, FORM

Nested Class Summary
 
Nested classes/interfaces inherited from class e4s.html.input.extended.E4InputField
E4InputField.A_PICK
 
Field Summary
protected  int m_displaylength
           
protected  int m_inputlength
           
protected  boolean m_uppercase
           
 
Fields inherited from class e4s.html.input.extended.E4InputField
BGCOLOR_READONLY, HTML_TAG, m_helpid, m_label, m_multiple_tablerows_id, m_name, m_pickup_ref, m_readonly, m_show_label, m_style_active, m_style_inactive, m_validation_object, m_validationmessage, m_value, m_visible, ms_help_image, PICKUP_IMAGE_NAME_PREFIX
 
Fields inherited from class e4s.html.E4HtmlElementGeneral
m_elements, m_needed_scripts
 
Fields inherited from class e4s.html.E4HtmlObject
m_parent_e4sID
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
TEXTFIELD(E4DBColumnInfo name, java.lang.String label)
          Construct a text input field.
TEXTFIELD(E4ID parent_id, E4DBColumnInfo name, E4Label_Intf label)
          Construct a text input field.
TEXTFIELD(E4ID parent_id, E4DBColumnInfo name, java.lang.String label)
          Construct a text input field.
TEXTFIELD(E4ID parent_id, E4InputFieldName_Intf name, E4Label_Intf label, int displaylength)
          Construct a text input field.
TEXTFIELD(E4ID parent_id, E4InputFieldName_Intf name, E4Label_Intf label, int displaylength, int inputlength)
          Construct a text input field.
TEXTFIELD(E4ID parent_id, E4InputFieldName_Intf name, java.lang.String label, int displaylength)
          Construct a text input field.
TEXTFIELD(E4ID parent_id, E4InputFieldName_Intf name, java.lang.String label, int displaylength, int inputlength)
          Construct a text input field.
TEXTFIELD(E4InputFieldName_Intf name, E4Label_Intf label, int displaylength)
          Construct a text input field.
TEXTFIELD(E4InputFieldName_Intf name, E4Label_Intf label, int displaylength, int inputlength)
          Construct a text input field.
TEXTFIELD(E4InputFieldName_Intf name, int displaylength)
          Construct a text input field, no label.
TEXTFIELD(E4InputFieldName_Intf name, int displaylength, int inputlength)
          Construct a text input field, no label.
TEXTFIELD(E4InputFieldName_Intf name, java.lang.String label, int displaylength)
          Construct a text input field.
TEXTFIELD(E4InputFieldName_Intf name, java.lang.String label, int displaylength, int inputlength)
          Construct a text input field.
TEXTFIELD(TEXTFIELD field)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 E4AjaxElementInputValueChanger addAjaxChanger(FORM form, E4AjaxData_Intf worker, E4ServletImplementation_Intf servlet)
          Add an AjaxElement to the field that can change the value visible in the form.
 E4InputField_Intf duplicate()
           
 int getLengthDisplay()
          Get the length for display.
 int getLengthMaxInput()
          Get the max length for input.
 java.lang.String getValue_native()
          This is the value that we see on the screen.
 java.lang.String getValue()
          Get the value of this input field.
 void setToUppercase()
          Any result will be set to uppercase characters
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 
Methods inherited from class e4s.html.input.extended.E4InputField
addElement, AppendValidationE4Message, changeColumnName, collectStylesForEditing, collectTranslationsForEditing, debugToString, definePickupList, definePickupList, definePickupList, definePickupList, definePickupList, definePickupList, definePickupList, display_simpleReport, E4ID, equalsIgnoreCase, eventHandlers, getCanChangeLayout, getColumnName, getErrorMessage, getEventHandlers, getHelpId, getHtmlParamName, getLabel, getMultipleTablerowsId, getPersistant, getPersistantLayout, getPickupList, getReadOnly, getSTYLE, getSTYLE, getValidator, hideLabel, HtmlEncode, isHiddenField, isMandatory, isVisible, onChange, onChange, onChange, onClick, removePickupList, resetValidation, setCanChangeLayout, setErrorMessage, setErrorMessage, setEventHandler, setHelpId, setHelpImage, setLabel, setMultipleTablerowsId, setReadOnly, setReadOnly, setReadOnly, setSTYLE, setSTYLE, setValidation, setValidator, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVisible, toHIDDENFIELD, toHtml_drawSimpleReport, toHtml_drawSimpleReport, toHtml_drawSimpleReport, toHtml_hidden, toHtml, toString, updatePersistantLayout, validate, validate, validate
 
Methods inherited from class e4s.html.input.extended.E4FieldsetLayout
isNextRow, layoutToNextRow
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, collectScripts, collectStylesForEditing, collectStylesForEditing, collectTranslationsForEditing, createScript, createScript, findElement, findElement, findElement, findElement, getElements, getElementsVec, getField, getId, getLastElement, getStringContent, getStyle, getStyle, hasScripts, hasSTYLE, isContentClass, isE4InputField_Intf, openTag, removeAll, removeElementById, removeElements, removeElements, removeStyle, setId, setStyle, setStyle, setSTYLE, Style, Style
 
Methods inherited from class e4s.html.E4HtmlObject
E4ID, set_e4sID
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface e4s.html.input.extended.E4InputField_Intf
changeColumnName, definePickupList, definePickupList, display_simpleReport, equalsIgnoreCase, eventHandlers, getCanChangeLayout, getColumnName, getErrorMessage, getHtmlParamName, getLabel, getMultipleTablerowsId, getPickupList, getReadOnly, hideLabel, isHiddenField, isMandatory, isVisible, resetValidation, setCanChangeLayout, setErrorMessage, setErrorMessage, setEventHandler, setHelpId, setLabel, setMultipleTablerowsId, setReadOnly, setReadOnly, setValidator, setValue, setValue, setValue, setValue, setValue, setVisible, toHIDDENFIELD, toHtml_drawSimpleReport, toHtml_drawSimpleReport, validate, validate
 
Methods inherited from interface e4s.html.E4FieldsetLayout_Intf
isNextRow, layoutToNextRow
 
Methods inherited from interface e4s.html.E4HtmlElement_Intf
addScript, addScript, addScript, collectScripts, collectStylesForEditing, collectTranslationsForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, toHtml_hidden, validate
 

Field Detail

m_displaylength

protected int m_displaylength

m_inputlength

protected int m_inputlength

m_uppercase

protected boolean m_uppercase
Constructor Detail

TEXTFIELD

public TEXTFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 java.lang.String label,
                 int displaylength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form, and also determining the maximum number of characters entered

TEXTFIELD

public TEXTFIELD(E4InputFieldName_Intf name,
                 java.lang.String label,
                 int displaylength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form, and also determining the maximum number of characters entered

TEXTFIELD

public TEXTFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 E4Label_Intf label,
                 int displaylength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form, and also determining the maximum number of characters entered

TEXTFIELD

public TEXTFIELD(E4InputFieldName_Intf name,
                 E4Label_Intf label,
                 int displaylength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form, and also determining the maximum number of characters entered

TEXTFIELD

public TEXTFIELD(E4InputFieldName_Intf name,
                 int displaylength)
Construct a text input field, no label.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
displaylength - number of characters displayed on the input form, and also determining the maximum number of characters entered

TEXTFIELD

public TEXTFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 java.lang.String label,
                 int displaylength,
                 int inputlength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form
inputlength - maximum number of characters possible entered

TEXTFIELD

public TEXTFIELD(E4InputFieldName_Intf name,
                 java.lang.String label,
                 int displaylength,
                 int inputlength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form
inputlength - maximum number of characters possible entered

TEXTFIELD

public TEXTFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 E4Label_Intf label,
                 int displaylength,
                 int inputlength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form
inputlength - maximum number of characters possible entered

TEXTFIELD

public TEXTFIELD(E4InputFieldName_Intf name,
                 E4Label_Intf label,
                 int displaylength,
                 int inputlength)
Construct a text input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input
displaylength - number of characters displayed on the input form
inputlength - maximum number of characters possible entered

TEXTFIELD

public TEXTFIELD(E4InputFieldName_Intf name,
                 int displaylength,
                 int inputlength)
Construct a text input field, no label.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
displaylength - number of characters displayed on the input form
inputlength - maximum number of characters possible entered

TEXTFIELD

public TEXTFIELD(E4ID parent_id,
                 E4DBColumnInfo name,
                 java.lang.String label)
Construct a text input field.

Parameters:
name - a column information object, containing the name of the field, datatype and length.
label - E4Label to be displayed on the screen during input

TEXTFIELD

public TEXTFIELD(E4DBColumnInfo name,
                 java.lang.String label)
Construct a text input field.

Parameters:
name - a column information object, containing the name of the field, datatype and length.
label - E4Label to be displayed on the screen during input

TEXTFIELD

public TEXTFIELD(E4ID parent_id,
                 E4DBColumnInfo name,
                 E4Label_Intf label)
Construct a text input field.

Parameters:
name - a column information object, containing the name of the field, datatype and length.
label - E4Label to be displayed on the screen during input

TEXTFIELD

public TEXTFIELD(TEXTFIELD field)
Method Detail

setToUppercase

public void setToUppercase()
Any result will be set to uppercase characters


toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Description copied from interface: E4HtmlElement_Intf
Create the HTML output for this element. Also run throught all child elements, and call their E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function to generate output of those objects which becomes appended. Normally, there is no need to call this function anyway, and this also might result in side effects of too-early relasing of objects in some cases. This function is called by E4ServletImplementation_Intf.write(e4s.html.E4HtmlElement) on the top level HTML element (common this is a HTML or BODY element) and branches down to all child elements.

Specified by:
toHtml in interface E4HtmlElement_Intf
Specified by:
toHtml in interface E4InputField_Intf
Overrides:
toHtml in class E4HtmlElementGeneral
servlet - the servlet environment currently running in
Throws:
java.lang.Exception

getLengthMaxInput

public int getLengthMaxInput()
Get the max length for input.

See Also:
getLengthDisplay()

getLengthDisplay

public int getLengthDisplay()
Get the length for display.

See Also:
getLengthMaxInput()

getValue

public java.lang.String getValue()
Get the value of this input field.

Returns:
the value
See Also:
E4InputField.setValue(java.lang.String)

getValue_native

public java.lang.String getValue_native()
Description copied from interface: E4InputField_Intf
This is the value that we see on the screen.

Specified by:
getValue_native in interface E4InputField_Intf
Overrides:
getValue_native in class E4InputField
Returns:
value

duplicate

public E4InputField_Intf duplicate()
Specified by:
duplicate in interface E4InputField_Intf

addAjaxChanger

public E4AjaxElementInputValueChanger addAjaxChanger(FORM form,
                                                     E4AjaxData_Intf worker,
                                                     E4ServletImplementation_Intf servlet)
Add an AjaxElement to the field that can change the value visible in the form.

Parameters:
form - the form where the field belongs to (important for the identification of the form by its name)
worker - the ajax element doing the output, output must be pure text only without any tags
servlet - the actual servlet contect
Returns:
the new created and added ajax element

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com