|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.html.E4HtmlObject
e4s.html.E4HtmlElementGeneral
e4s.html.input.extended.E4FieldsetLayout
e4s.html.input.extended.E4InputField
e4s.html.input.extended.DATEFIELD
public class DATEFIELD
An input field (for <FORM>) elements representing a date value.
| Example_InputForm.java |
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.E4FieldsetLayout |
|---|
isNextRow, layoutToNextRow |
| 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 |
|---|
public static final java.text.SimpleDateFormat DF_INTERNAL
| Constructor Detail |
|---|
public DATEFIELD(E4ID parent_id,
E4InputFieldName_Intf name,
java.lang.String label)
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
public DATEFIELD(E4InputFieldName_Intf name,
java.lang.String label)
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 inputpublic DATEFIELD(DATEFIELD field)
field - the existing field.
public DATEFIELD(E4ID parent_id,
E4InputFieldName_Intf name,
E4Label_Intf label)
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
public DATEFIELD(E4InputFieldName_Intf name,
E4Label_Intf label)
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
public DATEFIELD(E4ID parent_id,
E4InputFieldName_Intf name,
java.lang.String label,
boolean default_pickup)
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 inputdefault_pickup - if true, the default calendar pickup is used.E4ModuleCalendar.initSelection
public DATEFIELD(E4ID parent_id,
E4InputFieldName_Intf name,
E4Label_Intf label,
boolean default_pickup)
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 inputdefault_pickup - if true, the default calendar pickup is used.E4ModuleCalendar.initSelection| Method Detail |
|---|
public A_FORM definePickupList(E4MethodPickup mref)
E4InputFieldE4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).
definePickupList in interface E4InputField_IntfdefinePickupList in class E4InputFieldmref - Defining the function to be calledE4Constants.PARAM_ISPICKUP,
E4InputField.getPickupList()
public A_FORM definePickupList(E4MethodPickup mref,
E4JavaScript js_notify)
E4InputFieldE4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).
definePickupList in class E4InputFieldmref - Defining the function to be calledjs_notify - a script that will be called upon return of the pickup functionE4Constants.PARAM_ISPICKUP,
E4InputField.getPickupList()
public A_FORM definePickupList(E4MethodPickup mref,
boolean add)
E4InputFieldE4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).
definePickupList in interface E4InputField_IntfdefinePickupList in class E4InputFieldmref - Defining the function to be calledadd - add the pickup element to the field (this value should be set to true)E4Constants.PARAM_ISPICKUP,
E4InputField.getPickupList()
public A_FORM definePickupList(E4MethodPickup mref,
boolean add,
E4JavaScript js_notify)
E4InputFieldE4CgiParams E4Constants.PARAM_ISPICKUP is set to a value of true (1).
definePickupList in class E4InputFieldmref - Defining the function to be calledadd - 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 functionE4Constants.PARAM_ISPICKUP,
E4InputField.getPickupList()
public void toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
E4HtmlElement_IntfE4HtmlElement_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.
toHtml in interface E4HtmlElement_IntftoHtml in interface E4InputField_IntftoHtml in class E4HtmlElementGeneralservlet - the servlet environment currently running in
java.lang.Exception
public void toHtml_hidden(E4StringBufferHtml buf,
E4ServletImplementation_Intf context)
toHtml_hidden in interface E4HtmlElement_IntftoHtml_hidden in class E4InputFieldpublic java.text.SimpleDateFormat getCompleteDateFormat()
getDateFormat(),
getTimeFormat(),
setDateFormat(String),
setTimeFormat(String),
noTimeFormat(),
noDateFormat()public void setValue(java.util.Calendar dat)
dat - the date valuegetValue(),
setValue(java.util.Date),
setValue(e4s.html.E4CgiParams)public void setValue(java.util.Date dat)
setValue in interface E4InputField_IntfsetValue in class E4InputFielddat - the date valuegetValue(),
setValue(Calendar),
setValue(e4s.html.E4CgiParams)public java.util.Calendar getValueC()
getValue()public java.util.Date getValue()
getValueC(),
setValue(java.util.Calendar)public void setErrorMessage(E4Label_Intf error)
setErrorMessage in interface E4InputField_IntfsetErrorMessage in class E4InputFielderror - the String for the error message. A value of null resets the error message.getErrorMessage(),
#getTempErrorE4Message(),
#setValidation(Object,String),
validate(),
setErrorMessage(String)public void setErrorMessage(java.lang.String error)
setErrorMessage in interface E4InputField_IntfsetErrorMessage in class E4InputFielderror - the String for the error message. A value of null resets the error message.getErrorMessage(),
#setValidation(Object,String),
validate(),
setErrorMessage(e4s.translate.E4Label_Intf)public E4Label_Intf getErrorMessage()
getErrorMessage in interface E4InputField_IntfgetErrorMessage in class E4InputFielde4s.html.input.extended.E4InputField#setValidation(Object,String),
setErrorMessage(String),
setErrorMessage(E4Label_Intf),
validate()public E4Label_Intf getTempErrorMessage()
setValue(e4s.html.E4CgiParams).
getErrorMessage(),
clearTempErrorMessage()public void clearTempErrorMessage()
setValue(e4s.html.E4CgiParams).
#getTempErrorE4Message()public void setValue(E4CgiParams params)
#getTempErrorE4Message().
setValue in interface E4HtmlElement_IntfsetValue in interface E4InputField_IntfsetValue in class E4InputFieldparams - the parameterssetValue(java.util.Date),
setValue(Calendar),
#getTempErrorE4Message(),
E4CgiParams.checkParameterDate(e4s.html.input.extended.E4InputFieldName_Intf),
getValue()public static int getFormatAlias(java.lang.String datepicture)
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).
getFormatPicture(int),
E4CgiParams.NAME_SEPERATOR,
E4CgiParams.getFormatPicture(String)public static java.lang.String getFormatPicture(int formatAlias)
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).
getFormatAlias(String),
E4CgiParams.NAME_SEPERATOR,
E4CgiParams.getFormatPicture(String)public java.lang.String getDateFormat()
getDateFormat(),
setDateFormat(java.lang.String),
setTimeFormat(java.lang.String),
noDateFormat(),
noTimeFormat(),
getCompleteDateFormat()public java.lang.String getTimeFormat()
getDateFormat(),
setDateFormat(java.lang.String),
setTimeFormat(java.lang.String),
noDateFormat(),
noTimeFormat(),
getCompleteDateFormat()public java.text.SimpleDateFormat getFormat()
public void setDateFormat(java.lang.String dateformat)
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.getDateFormat(),
getTimeFormat(),
setDateFormat(java.lang.String),
setTimeFormat(java.lang.String),
noDateFormat(),
noTimeFormat(),
getCompleteDateFormat(),
#setDateFormat(SimpleDateFormat9public void setDateFormat(java.text.SimpleDateFormat dateformat)
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.getDateFormat(),
getTimeFormat(),
setDateFormat(java.lang.String),
setTimeFormat(java.lang.String),
noDateFormat(),
noTimeFormat(),
getCompleteDateFormat(),
setDateFormat(String)public void setTimeFormat(java.lang.String timeformat)
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.getDateFormat(),
getTimeFormat(),
setDateFormat(java.lang.String),
setTimeFormat(java.lang.String),
noDateFormat(),
noTimeFormat(),
getCompleteDateFormat(),
#SetTimeFormat(SimpleDateFormat)public void setTimeFormat(java.text.SimpleDateFormat timeformat)
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.getDateFormat(),
getTimeFormat(),
setDateFormat(java.lang.String),
setTimeFormat(java.lang.String),
noDateFormat(),
noTimeFormat(),
getCompleteDateFormat(),
#SetTimeFormat(String)public void noTimeFormat()
setTimeFormat(java.lang.String)public void noDateFormat()
setDateFormat(java.lang.String)public java.lang.String getHtmlParamName(boolean real_name)
public E4ValidatorDATEFIELD setValidation(java.util.Date from,
java.util.Date to)
public E4ValidatorDATEFIELD setValidation()
public boolean validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
E4InputField
validate in interface E4HtmlElement_Intfvalidate in class E4InputFieldparams - the current cgi parameters
java.lang.ExceptionE4InputField.validate(),
e4s.html.E4HtmlElementGeneral#validate(e4s.html.E4CgiParams)
public boolean validate(char mode,
E4Fieldset fieldset)
throws java.lang.Exception
validate in interface E4InputField_Intfvalidate in class E4InputFieldjava.lang.Exception
public boolean validate()
throws java.lang.Exception
E4InputFieldE4InputField.isVisible()).
validate in interface E4InputField_Intfvalidate in class E4InputFieldjava.lang.Exception#setValidation(Object,String),
E4InputField_Intf.setErrorMessage(String),
E4InputField_Intf.getErrorMessage()public E4InputField_Intf duplicate()
duplicate in interface E4InputField_IntfDATEFIELD(DATEFIELD)public void changeColumnName(E4InputFieldName_Intf name)
changeColumnName in interface E4InputField_IntfchangeColumnName in class E4InputFieldE4InputField.getHtmlParamName(),
E4InputField.getColumnName()public HIDDENFIELD toHIDDENFIELD()
toHIDDENFIELD in interface E4InputField_IntftoHIDDENFIELD in class E4InputFieldE4InputField.getHtmlParamName() as name and a date-value which
is either blank (when null) or formatted using E4CgiParams.DATEFORMAT.
public E4AjaxElementInputValueChanger addAjaxChanger(FORM form,
E4AjaxData_Intf worker,
E4ServletImplementation_Intf servlet)
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 tagsservlet - the actual servlet contect
public static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||