The Common-Controls Tag Library

<forms:msg>

Generates a message form element. The tag is normally used within a form of type info.

The messag text can be specified as an attribute (message) or the HTML-code can be directly specified 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 is the <forms:form> tag.
../images/images/formmsg.gif

Body content: JSP
Tag class: FormElementMessageTag
 

[ Syntax ]

Standard Syntax
<forms:msg
[ align = "{left | right | center}" ]
[ colspan = "Integer" ]
[ filter = "boolean" ]
[ height = "String" ]
[ join = "Boolean" ]
[ message = "String" ]
[ permission = "ACL" ]
[ severity = "{none | information | warning | error | fatal}" ]
[ valign = "{top | bottom | center}" ]
[ width = "String" ]
>
...Body Content...

</forms:msg>
 

[ 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  
filterboolean The automatic HTML coding of the element can be activated or disabled with the filter-attribute.  
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.

 
joinBoolean Indicates that two adjacent form elements should be joined together  
messageString The message text.  
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

 
severitySeverity Specifies the error class of the message.
  • none = no errors.
  • information = information.
  • warning = warning.
  • error = error.
  • fatal = fatal error.
 
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 message text.


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

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