The Common-Controls Tag Library

<forms:message>

Generates a message text form. The form expects, as the data model, an implementation of the interface com.cc.framework.message.Message.MessageDataModel.

Struts: If the Struts Framework is being used, the tag can also be used without the specification of a Data Bean. In this case, the Struts error collection (severity="error") or the message collection (severity="information") are displayed.

../images/images/formmessages.gif

Body content: JSP
Tag class: MessageTag
 

[ Syntax ]

Standard Syntax
<forms:message
formid = "String"
severity = "{none | information | warning | error | fatal}"
[ caption = "String" ]
[ detail = "String" ]
[ filter = "boolean" ]
[ hideButtons = "String list" ]
[ name = "String" ]
[ permission = "ACL" ]
[ property = "String" ]
[ style = "String" ]
[ styleClass = "String" ]
[ styleId = "String" ]
[ width = "String" ]
>
...Body Content...

</forms:message>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
captionString The main title of the form.

The title and detail can also be specified together in the form "title - detail.

 
detailString The detail title of the form.  
filterboolean The automatic HTML coding of the column contents can be activated or disabled with the filter-attribute.  
formidString The unique identification of the form. It is written in the form as a hidden field with the name formid and is thus available at the time of a form submission. The framework can call the corresponding EventHandler via the formid.
hideButtonsString list This attribute can be used to hide some of the buttons. The buttons needs to be specified within a semicolon separated list.

Annotation: A semicolon separated list. The button names must match values of ControlButton.getName()

 
nameString Specifies the name of the Java-Bean. The Java-Bean must be stored in the given scope.

When the tag is surrounded by a Struts <html:form> tag, no Bean Name need be specified. In this case, the Java-Bean is drawn via a property of the Struts Form Bean.

Annotation: A valid Java identifier must be given.

 
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

 
propertyString Specifies the name of the property using which the Java-Bean is to be accessed. This is generally only necessary when the Java-Bean is associated with a Struts Form Bean.

Annotation: A valid Java identifier must be given.

 
severitySeverity Specifies the error class of the message form. The appearance of the form is influenced by the error class.
  • none = no errors
  • information = Information
  • warning = Warning
  • error = error
  • fatal = fatal error. In case of a fatal error the application cannot continue running.
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.

 
widthString Specifies the width of the form window. The height may be specified in absolute or percent terms.

See HTML-Documentation

 

[ Example ]

Generates a form that displays the elements of the Struts ErrorMessages error collection.


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

<forms:message formid="frmError" caption="Error" severity="error" width="350"/>