org.araneaframework.jsp.tag.uilib.form.element.date
Class BaseFormDateTimeInputHtmlTag

java.lang.Object
  extended byorg.araneaframework.jsp.tag.BaseTag
      extended byorg.araneaframework.jsp.tag.PresentationTag
          extended byorg.araneaframework.jsp.tag.uilib.form.BaseFormElementHtmlTag
              extended byorg.araneaframework.jsp.tag.uilib.form.element.date.BaseFormDateTimeInputHtmlTag
All Implemented Interfaces:
AttributedTagInterface, ContainedTagInterface, FormElementTagInterface, javax.servlet.jsp.tagext.JspTag, StyledTagInterface, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
FormDateInputHtmlTag, FormDateTimeInputHtmlTag, FormTimeInputHtmlTag

public class BaseFormDateTimeInputHtmlTag
extends BaseFormElementHtmlTag

Standard date time input form element base tag.

Author:
Oleg Mürk, Margus Väli 2.05.2005 - precondition and onblur event notifying listeners

Field Summary
static String CALENDAR_BUTTON_ID_SUFFIX
           
protected  String calendarAlignment
           
protected  String calendarIconClass
           
protected  String dateFormat
           
static Long DEFAULT_DATE_INPUT_SIZE
           
static Long DEFAULT_TIME_INPUT_SIZE
           
protected  boolean disableCalendar
           
protected  String disabledRenderMode
           
protected  String onChangePrecondition
           
 
Fields inherited from class org.araneaframework.jsp.tag.uilib.form.BaseFormElementHtmlTag
accessKey, accessKeyId, backgroundValidation, controlViewModel, derivedId, events, FORMELEMENT_SPAN_PREFIX, formElementViewModel, formFullId, formViewModel, globalUpdateRegions, id, localizedLabel, RENDER_DISABLED_DISABLED, RENDER_DISABLED_READONLY, tabindex, updateRegionNames, updateRegions, validateOnEvent
 
Fields inherited from class org.araneaframework.jsp.tag.PresentationTag
attributes, baseStyleClass, style, styleClass
 
Fields inherited from class org.araneaframework.jsp.tag.BaseTag
GLOBAL_CONTEXT_ENTRIES_KEY, pageContext, parent
 
Fields inherited from interface org.araneaframework.jsp.tag.basic.AttributedTagInterface
ATTRIBUTED_TAG_KEY, HTML_ELEMENT_KEY
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
BaseFormDateTimeInputHtmlTag()
           
 
Method Summary
protected  String getHourSelectOnChangePrecondition(String timeInputId)
           
protected  String getMinuteSelectOnChangePrecondition(String timeInputId)
           
protected  String getSelectOnChangePrecondition(String timeInputId)
           
protected  String getTimeInputOnChangePrecondition(String timeInputId)
           
protected  String getTimeSelectScript(String selectId, Integer value, int valueCount)
           
 void setCalendarAlignment(String calendarAlignment)
           
 void setDateFormat(String dateFormat)
           
 void setDisableCalendar(String disableCalendar)
           
 void setDisabledRenderMode(String disabledRenderMode)
           
 void setOnChangePrecondition(String onChangePrecondition)
           
protected  void writeCalendarScript(Writer out, String id, String format)
           
protected  void writeDateInput(Writer out, String id, String name, String value, String label, boolean isMandatory, boolean isValid, Long size, boolean disabled, String styleClass, String accessKey, TimestampControl.ViewModel viewModel)
          Writes out date input
protected  void writeTimeInput(Writer out, String id, String name, String value, String label, Long size, boolean disabled, String styleClass, String accessKey, TimestampControl.ViewModel viewModel)
          Writes out time input The id and accessKey parameters may be null.
 
Methods inherited from class org.araneaframework.jsp.tag.uilib.form.BaseFormElementHtmlTag
assertControlType, doEndTag, doFinally, doStartTag, evaluateDisabledRenderMode, getFullFieldId, getHasElementContextSpan, setAccessKeyId, setEvents, setGlobalUpdateRegions, setHasElementContextSpan, setId, setTabindex, setUpdateRegions, setValidateOnEvent, writeBackgroundValidationAttribute, writeFormElementContextClose, writeFormElementContextOpen, writeFormElementContextOpen, writeFormElementContextOpen, writeFormElementValidationErrorMessages, writeFormElementValidityMarkers, writeSubmitScriptForUiEvent, writeSubmitScriptForUiEvent
 
Methods inherited from class org.araneaframework.jsp.tag.PresentationTag
addAttribute, calculateStyleClass, getStyle, getStyleClass, setPageContext, setStyle, setStyleClass
 
Methods inherited from class org.araneaframework.jsp.tag.BaseTag
addContextEntry, doCatch, doEndTag, doStartTag, evaluate, evaluateNotNull, executeEndSubtag, executeEndTagAndUnregister, executeStartSubtag, executeSubtag, getConfiguration, getContextEntry, getContextWidget, getContextWidgetFullId, getEnvironment, getLocalizationContext, getOutputData, getParent, hideGlobalContextEntries, registerAndExecuteStartTag, registerSubtag, release, requireContextEntry, restoreGlobalContextEntries, setParent, unregisterSubtag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.araneaframework.jsp.tag.StyledTagInterface
setStyle, setStyleClass
 
Methods inherited from interface org.araneaframework.jsp.tag.ContainedTagInterface
doEndTag, doStartTag, release, setPageContext
 
Methods inherited from interface org.araneaframework.jsp.tag.basic.AttributedTagInterface
addAttribute
 

Field Detail

CALENDAR_BUTTON_ID_SUFFIX

public static final String CALENDAR_BUTTON_ID_SUFFIX
See Also:
Constant Field Values

DEFAULT_DATE_INPUT_SIZE

public static final Long DEFAULT_DATE_INPUT_SIZE

DEFAULT_TIME_INPUT_SIZE

public static final Long DEFAULT_TIME_INPUT_SIZE

onChangePrecondition

protected String onChangePrecondition

calendarAlignment

protected String calendarAlignment

calendarIconClass

protected String calendarIconClass

disabledRenderMode

protected String disabledRenderMode

disableCalendar

protected boolean disableCalendar

dateFormat

protected String dateFormat
Constructor Detail

BaseFormDateTimeInputHtmlTag

public BaseFormDateTimeInputHtmlTag()
Method Detail

setOnChangePrecondition

public void setOnChangePrecondition(String onChangePrecondition)
                             throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException
Jsp.attribute:
type = "java.lang.String" required = "false" description = "Precondition for deciding whether go to server side or not."

setDisabledRenderMode

public void setDisabledRenderMode(String disabledRenderMode)
                           throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException
Since:
1.1.3
Jsp.attribute:
type = "java.lang.String" required = "false" description = "Specifies how to render a disabled input. Valid options are 'disabled' and 'read-only'. Default is 'disabled'."

setCalendarAlignment

public void setCalendarAlignment(String calendarAlignment)
                          throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException
Jsp.attribute:
type = "java.lang.String" required = "false" description = "Alignment for popup calendar. In form 'zx' where z is in {TBCtb} and x in {LRClr}. Default is 'Br' (Bottom, right)."

setDisableCalendar

public void setDisableCalendar(String disableCalendar)
                        throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException
Jsp.attribute:
type = "java.lang.String" required = "false" description = "Specifies whether the calendar should not be rendered (default is false)."

setDateFormat

public void setDateFormat(String dateFormat)
                   throws javax.servlet.jsp.JspException
Throws:
javax.servlet.jsp.JspException
Jsp.attribute:
type = "java.lang.String" required = "false" description = "Specifies date format for date input (default is '%d.%m.%Y')."

writeDateInput

protected void writeDateInput(Writer out,
                              String id,
                              String name,
                              String value,
                              String label,
                              boolean isMandatory,
                              boolean isValid,
                              Long size,
                              boolean disabled,
                              String styleClass,
                              String accessKey,
                              TimestampControl.ViewModel viewModel)
                       throws Exception
Writes out date input

Throws:
Exception

getTimeSelectScript

protected String getTimeSelectScript(String selectId,
                                     Integer value,
                                     int valueCount)
Since:
1.0.3

getTimeInputOnChangePrecondition

protected String getTimeInputOnChangePrecondition(String timeInputId)
Since:
1.0.3

getHourSelectOnChangePrecondition

protected String getHourSelectOnChangePrecondition(String timeInputId)
Since:
1.0.3

getMinuteSelectOnChangePrecondition

protected String getMinuteSelectOnChangePrecondition(String timeInputId)
Since:
1.0.3

getSelectOnChangePrecondition

protected String getSelectOnChangePrecondition(String timeInputId)
Since:
1.0.3

writeTimeInput

protected void writeTimeInput(Writer out,
                              String id,
                              String name,
                              String value,
                              String label,
                              Long size,
                              boolean disabled,
                              String styleClass,
                              String accessKey,
                              TimestampControl.ViewModel viewModel)
                       throws Exception
Writes out time input The id and accessKey parameters may be null. Note that the ID attribute is [for the moment, at least: 28.12.2004] only needed for the access keys to function. That is, the typical pattern as seen in HTML is:
 <label for="some.control.id" accesskey="some.key"> ...
 <input id="some.control.id" ... >
 
As you see, the input tag outputs its ID so that the label tag could reference it.

Throws:
Exception

writeCalendarScript

protected void writeCalendarScript(Writer out,
                                   String id,
                                   String format)
                            throws Exception
Throws:
Exception