The Common-Controls Tag Library

<forms:html>

The tag generates a HTML element.

The description text can be specified directly in the tag body. In the tag-body, all the HTML elements can be used for formatting.

The tag may only be used within a com.cc.framework.taglib.forms.FormElementContainerTag. Examples of this are <forms:form>, <forms:section> and <forms:buttonsection>. The description element always refers to the immediately preceding form element.
../images/images/formdescription_small.gif

Body content: JSP
Tag class: FormElementHtmlTag
 

[ Syntax ]

Standard Syntax
<forms:html
[ accesskey = "String" ]
[ align = "{left | right | center}" ]
[ colspan = "Integer" ]
[ height = "String" ]
[ help = "String" ]
[ imageref = "String" ]
[ join = "Boolean" ]
[ label = "String" ]
[ labeltooltip = "String" ]
[ permission = "ACL" ]
[ required = "boolean" ]
[ valign = "{top | bottom | center}" ]
[ width = "String" ]
>
...Body Content...

</forms:html>
 

[ 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
 
colspanInteger Specifies the column span of a form element within a multi column form  
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  
labelString The label of the form element.  
labeltooltipString Tooltip on for the label of the form element.  
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

 
requiredboolean Indicates whether the form element involved is a mandatory input. Mandatory fields are displayed highlighted for the user's convenience.  
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 element with an additional HTML text.


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

<forms:form  type="info"  caption="Information"  formid="frmInfo"  width="450"  locale="false">
    <forms:msg  severity="information"  message="No Access Rights for Selection!"/>
</forms:form>

<br/>

<forms:form  type="info"  caption="Information"  formid="frmInfo"  width="450"  locale="false">

    <forms:msg  severity="information">
      <table border="0" cellspacing="0" cellpadding="5">
         <tr>
            <td>
               <span style="color:red; font-weight: bold;"> No access rights for selection!</span>
            </td>
         </tr>
         <tr>
            <td valign="middle">
               <img src="app/images/mailto.gif" border="0" hspace="4" alt=""/>
               <a href="mailto:">Please contact your Adminstrator!</a>
            </td>
         </tr>
      </table>
   </forms:msg>

</forms:form>