The Common-Controls Tag Library

<forms:label>

Creates a label for the surrounding form element.
The tag may only be used within a taghandler which implements the com.cc.framework.taglib.forms.LabeledFormelementTag. These are the <formelementXXXXX>-Tags.

Body content: JSP
Tag class: FormLabelTag
 

[ Syntax ]

Standard Syntax
<forms:label
[ accesskey = "String" ]
[ align = "{left | right | center}" ]
[ filter = "boolean" ]
[ imageref = "String" ]
[ label = "String" ]
[ locale = "String" ]
[ maxlength = "Integer" ]
[ nowrap = "Boolean" ]
[ 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" ]
[ prefix = "String" ]
[ style = "String" ]
[ styleClass = "String" ]
[ styleId = "String" ]
[ suffix = "String" ]
[ tooltip = "String" ]
[ width = "String" ]
>
...Body Content...

</forms:label>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
accesskeyString The accesskey attribute can be used to specify a shortcut key for the <LABEL> (activated by pressing Alt and the accesskey togther).  
alignAlignmentType Specifies the horizontal alignment of the element.
  • left = left alignment
  • right = right alignment
  • center = center alignment
 
filterboolean The automatic HTML coding of the element can be activated or disabled with the filter-attribute.  
imagerefString Reference to an image in the imagemap. The image will be displayed in front of the label.  
labelString The label of the form element.  
localeString enables localization for the control element. String literals will be interpreted as keys in the Application.properties file.

Annotation: boolean value true oder false oder the name of a locale.

 
maxlengthInteger Specifies the maximum number of characters for the data input.  
nowrapBoolean Specifies if the label can be broken.  
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

 
prefixString A optional prefix (HTML literal) which which can be prepended to all labels within the form.

Annotation: A html literal.

 
styleString An HTML-style can be directly specified with this attribute.

Annotation: See HTML documentation for the attribute style.

 
styleClassString The HTML-class attribute of the element can be specified with this attribute.

Annotation: See HTML documentation for the Attribute class.

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

Annotation: See HTML documentation for the Attribute id.

 
suffixString A optional suffix (HTML literal) which which can be appended to all labels within the form.

Annotation: A html literal.

 
tooltipString A short descriptive text that is displayed when the user moves the mouse over the element.  
widthString Sets the width of the form element. The width may be specified in absolute or percent terms.

Annotation: See HTML documentation for the attribute width.

 

[ Example ]

The example shows the usage of the label tag within a form element.


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

<forms:form type="edit" caption="Userprofile - Edit" formid="frmEdit" width="550">

   <forms:row>
      <forms:text  property="p1"  size="15"  maxlength="20"  required="true" style="background-color: yellow; letter-spacing: 2px;">
         <forms:label
            locale="false"
            label="Account-number"
            style="color: gray; letter-spacing: 2px;"
            width="85"/>

      </forms:text>

      <forms:checkbox  property="p2"  description="Master"/>
   </forms:row>

   <forms:text  property="p3"  size="35"  maxlength="30"  required="true">
      <forms:label
         locale="false"
         label="Description"
         style="text-decoration: line-through;"/>

   </forms:text>
</forms:form>