The Common-Controls Tag Library

<forms:col>

Defines the visual attributes for a column within a form.
The tag may only be used within a <forms:colgroup>.

Body content: JSP
Tag class: FormColumnTag
 

[ Syntax ]

Standard Syntax
<forms:col
[ cellWidth = "String" ]
[ id = "String" ]
[ labelWidth = "String" ]
>
...Body Content...

</forms:col>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
cellWidthString Specifies the width for the control.

Annotation: See HTML documentation for the attribute width.

 
idString Assigns the control element a unique identifier. Using the given Id, the Java variable can be accessed in the tag Body. The id must be a string literal because the JSP compiler generates a variable with this name at compile time

Annotation: A valid Java identifier must be given.

 
labelWidthString Specifies the label width.

Annotation: See HTML documentation for the attribute width.

 

[ Example ]

Definition for a form with 2 columns


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

<html:form action="/demo">

    <forms:form type="edit" caption="headline" formid="frmEdit" width="550">
      <forms:colgroup>
         <forms:col labelWidth="90" cellWidth="200"/>
         <forms:col labelWidth="70" cellWidth="50"/>
      </forms:colgroup>  

      <!--  ...  -->

   </forms:form>
</html:form>