The Common-Controls Tag Library

<forms:section>

The tag generates a section in the enclosing form.
The tag may only be used within a <forms:form>-tag.
../images/images/formsection_small.gif

Body content: JSP
Tag class: FormElementSectionTag
 

[ Syntax ]

Standard Syntax
<forms:section
[ align = "{left | right | center}" ]
[ colspan = "Integer" ]
[ expandProperty = "String" ]
[ height = "String" ]
[ help = "String" ]
[ imageref = "String" ]
[ join = "Boolean" ]
[ noframe = "Boolean" ]
[ permission = "ACL" ]
[ title = "String" ]
[ valign = "{top | bottom | center}" ]
[ width = "String" ]
>
...Body Content...

</forms:section>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
alignAlignmentType Specifies the horizontal alignment of the element.
  • left = left alignment
  • right = right alignment
  • center = center alignment
 
colspanInteger Specifies the column span of a form element within a multi column form  
expandPropertyString Specifies the name of the property which determines if the element will be expanded or collapsed. The corresponding method must return a boolean value.

Annotation: A valid Java identifier must be given. The form bean has to implement a corresponding Property-Getter method.

 
heightString Sets the height of the form element. The height may be specified in absolute or percent terms.

Annotation: See HTML documentation for the attribute height.

 
helpString Allows to assign a help id for the element. If set, a help symbol will be displayed beside the element, which will generate an onHelp event if the icon is clicked. The id can be used to display a special page of the help system. The help system is not part of the Common-Controls Framework.

To generate the hyperlink some default framework resources where used:
Resource KeyDescriptionDefault
fw.help.onclickAn optional onclick script handler. The handler can include a {0} placeholder for the help id-
fw.help.targetSpecifies the target where to open the hyperlink_blank
fw.help.tooltipA tooltip for the hyperlinkcontext help

Annotation: A jump screen of the Help system must be specified.

 
imagerefString Pointer to an element of the Imagemap of the form. The image is drawn before the label of the element.  
joinBoolean Indicates that two adjacent form elements should be joined together  
noframeBoolean Can be used to hide the border for the control. The buttons will still be displayed above the control (depends on the registered PainterFactory.  
permissionACL With this attribute, access to the element can be restricted.

Authorizations are checked using the com.cc.framework.security.Principal object in the user session. The principal object is registered in the session with the method com.cc.framework.security.SecurityUtil#registerPrincipal(HttpSession, Principal). It is made available by the application developer by implementing the principal interface. In this manner, any authorization system can be very easily connected within the framework.

Authorizations are always specified in the form of an Access Control List (ACL). What is involved here is a semicolon-delimited list with individual authorizations. The framweork supports the following authorization types, which, however, can be expanded at will by the application developer:

Literal
true|false -> com.cc.framework.security.StaticPermission
Role
#rolename -> com.cc.framework.security.RoleBasedPermission
Function
$functionname -> com.cc.framework.security.FunctionBasedPermission

 
titleString The title of the section.  
valignAlignmentType Specifies the vertical alignment of the element.
  • top = top alignment
  • bottom = bottom alignment
  • center = center alignment
 
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 ]

Form with one section.


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

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

    <forms:plaintext  label="User"  property="user"  hidden="true"/>

    <%--  *************************  --%>
    <%--  ** Reporting Options **  --%>
    <%--  *************************  --%>
    <forms:section title="Reporting Options">
        <forms:select  label="Paper Format"  property="paper">
            <base:options  property="paperOptions"/>
        </forms:select>

        <forms:select  label="Print Format"  property="mime">
            <base:options  property="mimeOptions"/>
        </forms:select>
    </forms:section>

    <%--  **********************  --%>
    <%--  ** Formular Buttons **  --%>
    <%--  **********************  --%>
    <forms:buttonsection  default="btnSave">
        <forms:button  name="btnBack"  src="images/buttons/btnBack1.gif"/>
        <forms:button  name="btnSave"  src="images/buttons/btnSave1.gif"/>
    </forms:buttonsection>
</forms:form>