www.element4solution.com

e4s.html.input.extended
Class DATEFIELD

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.DATEFIELD
All Implemented Interfaces:
E4FieldsetLayout_Intf, E4HtmlElement_Intf, E4InputField_Intf

public class DATEFIELD
extends E4InputField
implements E4InputField_Intf

An input field (for <FORM>) elements representing a date value.

Example_InputForm.java

Since:
JDK 1.4
See Also:
TEXTFIELD, LONGFIELD, FLOATFIELD, FORM

Nested Class Summary
 
Nested classes/interfaces inherited from class e4s.html.input.extended.E4InputField
E4InputField.A_PICK
 
Field Summary
static java.text.SimpleDateFormat DF_INTERNAL
           
 
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
DATEFIELD(DATEFIELD field)
          Construct a text input field for a date value based on the given, existing field.
DATEFIELD(E4ID parent_id, E4InputFieldName_Intf name, E4Label_Intf label)
          Construct a text input field for a date value.
DATEFIELD(E4ID parent_id, E4InputFieldName_Intf name, E4Label_Intf label, boolean default_pickup)
          Construct a text input field for a date value.
DATEFIELD(E4ID parent_id, E4InputFieldName_Intf name, java.lang.String label)
          Construct a text input field for a date value.
DATEFIELD(E4ID parent_id, E4InputFieldName_Intf name, java.lang.String label, boolean default_pickup)
          Construct a text input field for a date value.
DATEFIELD(E4InputFieldName_Intf name, E4Label_Intf label)
          Construct a text input field for a date value.
DATEFIELD(E4InputFieldName_Intf name, java.lang.String label)
          Construct a text input field for a date value.
 
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.
 void changeColumnName(E4InputFieldName_Intf name)
          Change the name for the input field.
 void clearTempErrorMessage()
          Clear the temporary error message for the field (could be set in function setValue(e4s.html.E4CgiParams).
 A_FORM definePickupList(E4MethodPickup mref)
          Defines a pickup list.
 A_FORM definePickupList(E4MethodPickup mref, boolean add)
          Defines a pickup list.
 A_FORM definePickupList(E4MethodPickup mref, boolean add, E4JavaScript js_notify)
          Defines a pickup list.
 A_FORM definePickupList(E4MethodPickup mref, E4JavaScript js_notify)
          Defines a pickup list.
 E4InputField_Intf duplicate()
          Duplicate this field (copy all definitions and values).
 java.text.SimpleDateFormat getCompleteDateFormat()
          This returns the complete date format for the field.
 java.lang.String getDateFormat()
          Get definition of the part of the date format (year, month, days) using a picture String that is common with SimpleDateFormat.
 E4Label_Intf getErrorMessage()
          Get the error message for the field.
 java.text.SimpleDateFormat getFormat()
           
static int getFormatAlias(java.lang.String datepicture)
          In the case of a DATEFIELD input field, the name of the field is automatically extended by this NAME_SEPERATOR sign and an alias definition for the format.
static java.lang.String getFormatPicture(int formatAlias)
          In the case of a DATEFIELD input field, the name of the field is automatically extended by this NAME_SEPERATOR sign and an alias definition for the format.
 java.lang.String getHtmlParamName(boolean real_name)
           
 E4Label_Intf getTempErrorMessage()
          Get the temporary error message for the field (could be set in function setValue(e4s.html.E4CgiParams).
 java.lang.String getTimeFormat()
          Get definition of the part of the time format (hours. minutes, seconds) using a picture String that is common with SimpleDateFormat.
 java.util.Date getValue()
          Get the value of the field.
 java.util.Calendar getValueC()
          Get the value of the field.
 void noDateFormat()
          Same as setTimeFormat(null).
 void noTimeFormat()
          Same as setTimeFormat(null).
 void setDateFormat(java.text.SimpleDateFormat dateformat)
          Define the part of the date format (year, month, days) using a picture String that is common with SimpleDateFormat.
 void setDateFormat(java.lang.String dateformat)
          Define the part of the date format (year, month, days) using a picture String that is common with SimpleDateFormat.
 void setErrorMessage(E4Label_Intf error)
          Set the error message for the field.
 void setErrorMessage(java.lang.String error)
          Set the error message for the field.
 void setTimeFormat(java.text.SimpleDateFormat timeformat)
          Define the part of the time format (hours, minutes, seconds) using a picture String that is common with SimpleDateFormat.
 void setTimeFormat(java.lang.String timeformat)
          Define the part of the time format (hours, minutes, seconds) using a picture String that is common with SimpleDateFormat.
 E4ValidatorDATEFIELD setValidation()
           
 E4ValidatorDATEFIELD setValidation(java.util.Date from, java.util.Date to)
           
 void setValue(java.util.Calendar dat)
          Set the value for the DATEFIELD, the temporary error message will be reset.
 void setValue(java.util.Date dat)
          Set the value for the DATEFIELD, the temporary error message will be reset.
 void setValue(E4CgiParams params)
          Set the value for the DATEFIELD out of the parameters specified.
 HIDDENFIELD toHIDDENFIELD()
          Convert this field to a HIDDENFIELD.
 void toHtml_hidden(E4StringBufferHtml buf, E4ServletImplementation_Intf context)
           
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 boolean validate()
          If a validation function is declared, then it is called and any String result returning from this validation function indicates that something with the field went wrong, and the return value will be false.
 boolean validate(char mode, E4Fieldset fieldset)
           
 boolean validate(E4CgiParams params, E4ServletImplementation_Intf servlet)
          Set the parameters specified and validate.
 
Methods inherited from class e4s.html.input.extended.E4InputField
addElement, AppendValidationE4Message, collectStylesForEditing, collectTranslationsForEditing, debugToString, definePickupList, definePickupList, definePickupList, display_simpleReport, E4ID, equalsIgnoreCase, eventHandlers, getCanChangeLayout, getColumnName, getEventHandlers, getHelpId, getHtmlParamName, getLabel, getMultipleTablerowsId, getPersistant, getPersistantLayout, getPickupList, getReadOnly, getSTYLE, getSTYLE, getValidator, getValue_native, hideLabel, HtmlEncode, isHiddenField, isMandatory, isVisible, onChange, onChange, onChange, onClick, removePickupList, resetValidation, setCanChangeLayout, setEventHandler, setHelpId, setHelpImage, setLabel, setMultipleTablerowsId, setReadOnly, setReadOnly, setReadOnly, setSTYLE, setSTYLE, setValidation, setValidator, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVisible, toHtml_drawSimpleReport, toHtml_drawSimpleReport, toHtml_drawSimpleReport, toHtml, toString, updatePersistantLayout
 
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
display_simpleReport, equalsIgnoreCase, eventHandlers, getCanChangeLayout, getColumnName, getHtmlParamName, getLabel, getMultipleTablerowsId, getPickupList, getReadOnly, getValue_native, hideLabel, isHiddenField, isMandatory, isVisible, resetValidation, setCanChangeLayout, setEventHandler, setHelpId, setLabel, setMultipleTablerowsId, setReadOnly, setReadOnly, setValidator, setValue, setValue, setValue, setVisible, toHtml_drawSimpleReport, toHtml_drawSimpleReport
 
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
 

Field Detail

DF_INTERNAL

public static final java.text.SimpleDateFormat DF_INTERNAL
Constructor Detail

DATEFIELD

public DATEFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 java.lang.String label)
Construct a text input field for a date value. The default calendar pickup list is used.

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

DATEFIELD

public DATEFIELD(E4InputFieldName_Intf name,
                 java.lang.String label)
Construct a text input field for a date value. The default calendar pickup list is used.

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

DATEFIELD

public DATEFIELD(DATEFIELD field)
Construct a text input field for a date value based on the given, existing field.

Parameters:
field - the existing field.

DATEFIELD

public DATEFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 E4Label_Intf label)
Construct a text input field for a date value. The default calendar pickup list is used.

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

DATEFIELD

public DATEFIELD(E4InputFieldName_Intf name,
                 E4Label_Intf label)
Construct a text input field for a date value. The default calendar pickup list is used.

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

DATEFIELD

public DATEFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 java.lang.String label,
                 boolean default_pickup)
Construct a text input field for a date value.

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
default_pickup - if true, the default calendar pickup is used.
See Also:
E4ModuleCalendar.initSelection

DATEFIELD

public DATEFIELD(E4ID parent_id,
                 E4InputFieldName_Intf name,
                 E4Label_Intf label,
                 boolean default_pickup)
Construct a text input field for a date value.

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
default_pickup - if true, the default calendar pickup is used.
See Also:
E4ModuleCalendar.initSelection
Method Detail

definePickupList

public A_FORM definePickupList(E4MethodPickup mref)
Description copied from class: E4InputField
Defines a pickup list. A pickup list typical openes in a new window and offers values to be picked. For example a calendar would be a typical pickup implementation. When the user clicks on the value, it is stored into the input field. While the callback functions are running in the pickup mode (that means, that there is a field expecting a value some time), then the E4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).

Specified by:
definePickupList in interface E4InputField_Intf
Overrides:
definePickupList in class E4InputField
Parameters:
mref - Defining the function to be called
See Also:
E4Constants.PARAM_ISPICKUP, E4InputField.getPickupList()

definePickupList

public A_FORM definePickupList(E4MethodPickup mref,
                               E4JavaScript js_notify)
Description copied from class: E4InputField
Defines a pickup list. A pickup list typical openes in a new window and offers values to be picked. For example a calendar would be a typical pickup implementation. When the user clicks on the value, it is stored into the input field. While the callback functions are running in the pickup mode (that means, that there is a field expecting a value some time), then the E4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).

Overrides:
definePickupList in class E4InputField
Parameters:
mref - Defining the function to be called
js_notify - a script that will be called upon return of the pickup function
See Also:
E4Constants.PARAM_ISPICKUP, E4InputField.getPickupList()

definePickupList

public A_FORM definePickupList(E4MethodPickup mref,
                               boolean add)
Description copied from class: E4InputField
Defines a pickup list. A pickup list typical openes in a new window and offers values to be picked. For example a calendar would be a typical pickup implementation. When the user clicks on the value, it is stored into the input field. While the callback functions are running in the pickup mode (that means, that there is a field expecting a value some time), then the E4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).

Specified by:
definePickupList in interface E4InputField_Intf
Overrides:
definePickupList in class E4InputField
Parameters:
mref - Defining the function to be called
add - add the pickup element to the field (this value should be set to true)
See Also:
E4Constants.PARAM_ISPICKUP, E4InputField.getPickupList()

definePickupList

public A_FORM definePickupList(E4MethodPickup mref,
                               boolean add,
                               E4JavaScript js_notify)
Description copied from class: E4InputField
Defines a pickup list. A pickup list typical openes in a new window and offers values to be picked. For example a calendar would be a typical pickup implementation. When the user clicks on the value, it is stored into the input field. While the callback functions are running in the pickup mode (that means, that there is a field expecting a value some time), then the E4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).

Overrides:
definePickupList in class E4InputField
Parameters:
mref - Defining the function to be called
add - add the pickup element to the field (this value should be set to true)
js_notify - a script that will be called upon return of the pickup function
See Also:
E4Constants.PARAM_ISPICKUP, E4InputField.getPickupList()

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

toHtml_hidden

public void toHtml_hidden(E4StringBufferHtml buf,
                          E4ServletImplementation_Intf context)
Specified by:
toHtml_hidden in interface E4HtmlElement_Intf
Overrides:
toHtml_hidden in class E4InputField

getCompleteDateFormat

public java.text.SimpleDateFormat getCompleteDateFormat()
This returns the complete date format for the field. The "complete" date format can contains a picture for the date (e.g. "yyyyMMdd") or for the time (e.g. "HH:MM") or a combination.

Returns:
the formatted assigned with the picture
See Also:
getDateFormat(), getTimeFormat(), setDateFormat(String), setTimeFormat(String), noTimeFormat(), noDateFormat()

setValue

public void setValue(java.util.Calendar dat)
Set the value for the DATEFIELD, the temporary error message will be reset.

Parameters:
dat - the date value
See Also:
getValue(), setValue(java.util.Date), setValue(e4s.html.E4CgiParams)

setValue

public void setValue(java.util.Date dat)
Set the value for the DATEFIELD, the temporary error message will be reset.

Specified by:
setValue in interface E4InputField_Intf
Overrides:
setValue in class E4InputField
Parameters:
dat - the date value
See Also:
getValue(), setValue(Calendar), setValue(e4s.html.E4CgiParams)

getValueC

public java.util.Calendar getValueC()
Get the value of the field.

Returns:
the field value
See Also:
getValue()

getValue

public java.util.Date getValue()
Get the value of the field.

Returns:
the field value
See Also:
getValueC(), setValue(java.util.Calendar)

setErrorMessage

public void setErrorMessage(E4Label_Intf error)
Set the error message for the field. Each field can handle it's own error message, caused by a validation.

Specified by:
setErrorMessage in interface E4InputField_Intf
Overrides:
setErrorMessage in class E4InputField
Parameters:
error - the String for the error message. A value of null resets the error message.
See Also:
getErrorMessage(), #getTempErrorE4Message(), #setValidation(Object,String), validate(), setErrorMessage(String)

setErrorMessage

public void setErrorMessage(java.lang.String error)
Set the error message for the field. Each field can handle it's own error message, caused by a validation. Same as setErrorMessage(new Label_Sys(String)).

Specified by:
setErrorMessage in interface E4InputField_Intf
Overrides:
setErrorMessage in class E4InputField
Parameters:
error - the String for the error message. A value of null resets the error message.
See Also:
getErrorMessage(), #setValidation(Object,String), validate(), setErrorMessage(e4s.translate.E4Label_Intf)

getErrorMessage

public E4Label_Intf getErrorMessage()
Get the error message for the field. Each field can handle it's own error message, caused by a validation.

Specified by:
getErrorMessage in interface E4InputField_Intf
Overrides:
getErrorMessage in class E4InputField
Returns:
return the error message. If the temporary error message was be set, this value will be returned.
See Also:
e4s.html.input.extended.E4InputField#setValidation(Object,String), setErrorMessage(String), setErrorMessage(E4Label_Intf), validate()

getTempErrorMessage

public E4Label_Intf getTempErrorMessage()
Get the temporary error message for the field (could be set in function setValue(e4s.html.E4CgiParams).

Returns:
the error message or null if no error occured
See Also:
getErrorMessage(), clearTempErrorMessage()

clearTempErrorMessage

public void clearTempErrorMessage()
Clear the temporary error message for the field (could be set in function setValue(e4s.html.E4CgiParams).

See Also:
#getTempErrorE4Message()

setValue

public void setValue(E4CgiParams params)
Set the value for the DATEFIELD out of the parameters specified. In the case, that the input value cannot be converted into a date value, the temporary error message will be set which can be retrieved using #getTempErrorE4Message().

Specified by:
setValue in interface E4HtmlElement_Intf
Specified by:
setValue in interface E4InputField_Intf
Overrides:
setValue in class E4InputField
Parameters:
params - the parameters
See Also:
setValue(java.util.Date), setValue(Calendar), #getTempErrorE4Message(), E4CgiParams.checkParameterDate(e4s.html.input.extended.E4InputFieldName_Intf), getValue()

getFormatAlias

public static int getFormatAlias(java.lang.String datepicture)
In the case of a DATEFIELD input field, the name of the field is automatically extended by this NAME_SEPERATOR sign and an alias definition for the format. The alias definition is a integer value, created by getFormatAlias(String) and stored in a static Vector in class DATEFIELD internally. To get the dateformat (picture), the fieldname is cut off into two parts: the real fieldname and the alias definition for the picture. Then this alias definition is translated back into the real date picture, using getFormatPicture(int).

See Also:
getFormatPicture(int), E4CgiParams.NAME_SEPERATOR, E4CgiParams.getFormatPicture(String)

getFormatPicture

public static java.lang.String getFormatPicture(int formatAlias)
In the case of a DATEFIELD input field, the name of the field is automatically extended by this NAME_SEPERATOR sign and an alias definition for the format. The alias definition is a integer value, created by getFormatAlias(String) and stored in a static Vector in class DATEFIELD internally. To get the dateformat (picture), the fieldname is cut off into two parts: the real fieldname and the alias definition for the picture. Then this alias definition is translated back into the real date picture, using getFormatPicture(int).

See Also:
getFormatAlias(String), E4CgiParams.NAME_SEPERATOR, E4CgiParams.getFormatPicture(String)

getDateFormat

public java.lang.String getDateFormat()
Get definition of the part of the date format (year, month, days) using a picture String that is common with SimpleDateFormat.

Returns:
null if no date input or display is defined or the picture (e.g. "yyyyMMdd")
See Also:
getDateFormat(), setDateFormat(java.lang.String), setTimeFormat(java.lang.String), noDateFormat(), noTimeFormat(), getCompleteDateFormat()

getTimeFormat

public java.lang.String getTimeFormat()
Get definition of the part of the time format (hours. minutes, seconds) using a picture String that is common with SimpleDateFormat.

Returns:
null if no time input or display is defined or the picture (e.g. "HH:MM")
See Also:
getDateFormat(), setDateFormat(java.lang.String), setTimeFormat(java.lang.String), noDateFormat(), noTimeFormat(), getCompleteDateFormat()

getFormat

public java.text.SimpleDateFormat getFormat()

setDateFormat

public void setDateFormat(java.lang.String dateformat)
Define the part of the date format (year, month, days) using a picture String that is common with SimpleDateFormat.

Parameters:
dateformat - null if no date input or display is required, any picture valid for date as beeing used with SimpleDateFormat. No hours, minutes, seconds pictures recommended.
See Also:
getDateFormat(), getTimeFormat(), setDateFormat(java.lang.String), setTimeFormat(java.lang.String), noDateFormat(), noTimeFormat(), getCompleteDateFormat(), #setDateFormat(SimpleDateFormat9

setDateFormat

public void setDateFormat(java.text.SimpleDateFormat dateformat)
Define the part of the date format (year, month, days) using a picture String that is common with SimpleDateFormat.

Parameters:
dateformat - null if no date input or display is required, any picture valid for date as beeing used with SimpleDateFormat. No hours, minutes, seconds pictures recommended.
See Also:
getDateFormat(), getTimeFormat(), setDateFormat(java.lang.String), setTimeFormat(java.lang.String), noDateFormat(), noTimeFormat(), getCompleteDateFormat(), setDateFormat(String)

setTimeFormat

public void setTimeFormat(java.lang.String timeformat)
Define the part of the time format (hours, minutes, seconds) using a picture String that is common with SimpleDateFormat.

Parameters:
timeformat - null if no time input or display is required, any picture valid for time as beeing used with SimpleDateFormat. No year, month or day pictures recommended.
See Also:
getDateFormat(), getTimeFormat(), setDateFormat(java.lang.String), setTimeFormat(java.lang.String), noDateFormat(), noTimeFormat(), getCompleteDateFormat(), #SetTimeFormat(SimpleDateFormat)

setTimeFormat

public void setTimeFormat(java.text.SimpleDateFormat timeformat)
Define the part of the time format (hours, minutes, seconds) using a picture String that is common with SimpleDateFormat.

Parameters:
timeformat - null if no time input or display is required, any picture valid for time as beeing used with SimpleDateFormat. No year, month or day pictures recommended.
See Also:
getDateFormat(), getTimeFormat(), setDateFormat(java.lang.String), setTimeFormat(java.lang.String), noDateFormat(), noTimeFormat(), getCompleteDateFormat(), #SetTimeFormat(String)

noTimeFormat

public void noTimeFormat()
Same as setTimeFormat(null).

See Also:
setTimeFormat(java.lang.String)

noDateFormat

public void noDateFormat()
Same as setTimeFormat(null).

See Also:
setDateFormat(java.lang.String)

getHtmlParamName

public java.lang.String getHtmlParamName(boolean real_name)

setValidation

public E4ValidatorDATEFIELD setValidation(java.util.Date from,
                                          java.util.Date to)

setValidation

public E4ValidatorDATEFIELD setValidation()

validate

public boolean validate(E4CgiParams params,
                        E4ServletImplementation_Intf servlet)
                 throws java.lang.Exception
Description copied from class: E4InputField
Set the parameters specified and validate. Note that this also will change the current value of the field.

Specified by:
validate in interface E4HtmlElement_Intf
Overrides:
validate in class E4InputField
Parameters:
params - the current cgi parameters
Returns:
true, if all defined validations will return true. false, if at least one validation returns false. Note, that in any case all validations must be performed to set the fields error-messages.
Throws:
java.lang.Exception
See Also:
E4InputField.validate(), e4s.html.E4HtmlElementGeneral#validate(e4s.html.E4CgiParams)

validate

public boolean validate(char mode,
                        E4Fieldset fieldset)
                 throws java.lang.Exception
Specified by:
validate in interface E4InputField_Intf
Overrides:
validate in class E4InputField
Throws:
java.lang.Exception

validate

public boolean validate()
                 throws java.lang.Exception
Description copied from class: E4InputField
If a validation function is declared, then it is called and any String result returning from this validation function indicates that something with the field went wrong, and the return value will be false. This indication is stored in the m_validationmessage variable for further use. Only visible fields are validated (see E4InputField.isVisible()).

Specified by:
validate in interface E4InputField_Intf
Overrides:
validate in class E4InputField
Returns:
true, if everything is o.k.
Throws:
java.lang.Exception
See Also:
#setValidation(Object,String), E4InputField_Intf.setErrorMessage(String), E4InputField_Intf.getErrorMessage()

duplicate

public E4InputField_Intf duplicate()
Duplicate this field (copy all definitions and values).

Specified by:
duplicate in interface E4InputField_Intf
Returns:
a new instance of an DATEFIELD.
See Also:
DATEFIELD(DATEFIELD)

changeColumnName

public void changeColumnName(E4InputFieldName_Intf name)
Change the name for the input field. Normally, a name is assigned during declaration.

Specified by:
changeColumnName in interface E4InputField_Intf
Overrides:
changeColumnName in class E4InputField
See Also:
E4InputField.getHtmlParamName(), E4InputField.getColumnName()

toHIDDENFIELD

public HIDDENFIELD toHIDDENFIELD()
Convert this field to a HIDDENFIELD.

Specified by:
toHIDDENFIELD in interface E4InputField_Intf
Overrides:
toHIDDENFIELD in class E4InputField
Returns:
a new created HIDDENFIELD with the E4InputField.getHtmlParamName() as name and a date-value which is either blank (when null) or formatted using E4CgiParams.DATEFORMAT.

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