The Common-Controls Tag Library

<ctrl:calendar>

Generates an input field for a date time string. The date time string can be selected from a popup calendar.

Mask Example
yy/MM/dd04/05/31
yyyy/MM/dd2004/05/31
DDDDMonday
DDDD yyyy-MM-ddMonday 2004-04-31
HH:mm15:33
HH:mm:ss15:33:20
HH:mm:ss tt03:33:20 PM
HH:mm 'Hour'15:33 Hour
DDDD yyyy-MM-dd HH:mm:ss ttMonday 2004-04-31 07:29:59 AM

../images/images/calendar_ctrl.gif

Body content: JSP
Tag class: CalendarTag
 

[ Syntax ]

Standard Syntax
<ctrl:calendar
[ buttonAlt = "String" ]
[ buttonTooltip = "String" ]
[ converter = "Java class or Converter Id" ]
[ disabled = "boolean" ]
[ format = "String" ]
[ id = "String" ]
[ layout = "String" ]
[ maxlength = "Integer" ]
[ mode = "{popup | inline}" ]
[ name = "String" ]
[ onblur = "String" ]
[ onchange = "String" ]
[ onclick = "String" ]
[ oncontextmenu = "String" ]
[ ondblclick = "String" ]
[ onfocus = "String" ]
[ onkeydown = "String" ]
[ onkeypress = "String" ]
[ onkeyup = "String" ]
[ onmousedown = "String" ]
[ onmousemove = "String" ]
[ onmouseout = "String" ]
[ onmouseover = "String" ]
[ onmouseup = "String" ]
[ property = "String" ]
[ scope = "{any | page | request | session | application}" ]
[ showButton = "{true | false}" ]
[ showformat = "{none | right | bottom}" ]
[ size = "Integer" ]
[ style = "String" ]
[ styleId = "String" ]
[ tabindex = "Integer" ]
[ tooltip = "String" ]
[ value = "String" ]
>
...Body Content...

</ctrl:calendar>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
buttonAltString Specifies the alternative text that is output when the display of images in the browser has been disabled.  
buttonTooltipString A short descriptive text that is displayed when the user moves the mouse over the button.  
converterJava class or Converter Id Specifies the Converter which should be used to convert the data for the control. If the attribute is not set the framework will use a default converter which matches the controls data type (ConverterRegistry.lookup()).

A converter can be specified in different ways:

  • The public Converter Id is set.
  • Or a full qualified Java class name for the converter is specified. The class must implement the interface Converter

Annotation: The class must to implement the interface Converter!

 
disabledboolean This attribute can be used to disable the control element. It then does not accept any user inputs and does not generate any control element events.  
formatString Specifies the date and time format. If a time format is specified also a time can be entered.  
idString The name of a page scope JSP bean that will contain the current element. Using the given Id, the variable can be accessed in scripting expressions in the tag Body. The id mus be a string lteral because the JSP compiler generates a variable withthis name at compile time

Annotation: A valid Java identifier must be given.

 
layoutString Specifies the template which should be used for the calendar.  
maxlengthInteger Specifies the maximum number of characters for the data input.  
modeCalendarMode Specifies the behavior of the calendar window.
  • popup = The icon behind the input field will open a new popup window (default).
  • inline = The icon behind the input field will open an inline calendar which is rendered in the current browser window.
 
nameString Specifies the name of the Java-Bean. The Java-Bean must be stored in the given scope.

When the tag is surrounded by a Struts <html:form> tag, no Bean Name need be specified. In this case, the Java-Bean is drawn via a property of the Struts Form Bean.

Annotation: A valid Java identifier must be given.

 
onblurString Fires when the object loses the input focus.

Annotation: JavaScript Code

 
onchangeString Fires when the contents of the object or selection have changed.

Annotation: JavaScript Code

 
onclickString Fires when the user clicks the left mouse button on the object.

Annotation: JavaScript Code

 
oncontextmenuString Fires when the user clicks the right mouse button in the client area, opening the context menu.

Annotation: JavaScript Code

 
ondblclickString Fires when the user double-clicks the object.

Annotation: JavaScript Code

 
onfocusString Fires when the object receives focus.

Annotation: JavaScript Code

 
onkeydownString Fires when the user presses a key.

Annotation: JavaScript Code

 
onkeypressString Fires when the user presses an alphanumeric key.

Annotation: JavaScript Code

 
onkeyupString Fires when the user releases a key.

Annotation: JavaScript Code

 
onmousedownString Fires when the user clicks the object with either mouse button.

Annotation: JavaScript Code

 
onmousemoveString Fires when the user moves the mouse over the object.

Annotation: JavaScript Code

 
onmouseoutString Fires when the user moves the mouse pointer outside the boundaries of the object.

Annotation: JavaScript Code

 
onmouseoverString Fires when the user moves the mouse pointer into the object.

Annotation: JavaScript Code

 
onmouseupString Fires when the user releases a mouse button while the mouse is over the object.

Annotation: JavaScript Code

 
propertyString Specifies the name of the property using which the Java-Bean is to be accessed. This is generally only necessary when the Java-Bean is associated with a Struts Form Bean.

Annotation: A valid Java identifier must be given.

 
scopeHTTPScope This attribute shows the Scope in which the Java-Bean with the actual display data can be found.
  • any = The Bean is searched for in ever Scope.
  • page = The Bean exists as a local variable in the JSP Page.
  • request = The Bean is in the HTTP-Request.
  • session = The Bean is in the HTTP-Session.
  • application = The Bean is in the Servletkontext.
 
showButtonboolean Specifies if the button behind the input field should be displayed
  • true = Display the button
  • false = Not display the button
 
showformatString Specifies if the format mask should also be displayed.
  • none = The format mask is not displayed (default).
  • right = The format mask is displayed behind the input field.
  • bottom = The format mask is displayed under the input field.
 
sizeInteger Specifies the number of visible characters.  
styleString An HTML-style can be directly specified with this attribute.

Annotation: See HTML documentation for the attribute style.

 
styleIdString The HTML-id attribute of the element can be specified with this attribute.

Annotation: See HTML documentation for the Attribute id.

 
tabindexInteger Tabulator Index for this element.  
tooltipString A short descriptive text that is displayed when the user moves the mouse over the element.

The character string is HTML-encoded before outputting.

 
valueString This attribute sets the initial displayed value of the field if it displays a textual or numerical value.

Annotation: See HTML documentation for the attribute value.

 

[ Example ]

Calendar


<%@ taglib uri="http://www.common-controls.com/cc/tags-ctrl"    prefix="ctrl" %>

<ctrl:calendar name="mybean" property="date" maxlength="10" size="8"  format="dd/mm/yyyy"  showformat="right"/>