The Common-Controls Tag Library

<forms:plaintext>

The tag generates a simple static text element in the enclosing form. The contents can be specified in three ways:
The tag may only be used within a com.cc.framework.taglib.forms.FormElementContainerTag. Examples of this are <forms:form> and <forms:section>.
../images/images/formplaintext_small.gif

Body content: JSP
Tag class: FormElementPlaintextTag
 

[ Syntax ]

Standard Syntax
<forms:plaintext
[ accesskey = "String" ]
[ align = "{left | right | center}" ]
[ colspan = "Integer" ]
[ converter = "Java class or Converter Id" ]
[ description = "String" ]
[ filter = "boolean" ]
[ height = "String" ]
[ help = "String" ]
[ hidden = "boolean" ]
[ id = "String" ]
[ imageref = "String" ]
[ join = "Boolean" ]
[ label = "String" ]
[ labeltooltip = "String" ]
[ name = "String" ]
[ permission = "ACL" ]
[ property = "String" ]
[ tooltip = "String" ]
[ valign = "{top | bottom | center}" ]
[ value = "String" ]
[ width = "String" ]
>
...Body Content...

</forms:plaintext>
 

[ 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  
converterJava class or Converter Id Specifies the Converter which should be used to convert the data for the control. If the attribute is not set the framework will use a default converter which matches the controls data type (ConverterRegistry.lookup()).

A converter can be specified in different ways:

  • The public Converter Id is set.
  • Or a full qualified Java class name for the converter is specified. The class must implement the interface Converter

Annotation: The class must to implement the interface Converter!

 
descriptionString The description text.  
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.

 
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.

 
hiddenboolean This flag indicates whether a hidden field should be additionally generated. This will enable access to the field contents when there is a Form Submit.  
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.

 
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.  
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.

 
tooltipString A short descriptive text that is displayed when the user moves the mouse over the element.  
valignAlignmentType Specifies the vertical alignment of the element.
  • top = top alignment
  • bottom = bottom alignment
  • center = center alignment
 
valueString The value of the field can also be specified directly with this attribute.  
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 a static text element.


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

<forms:form  type="display"  caption="Company - Display"  formid="frmDisplay"  width="500">
    <forms:plaintext  label="Name"  property="name"/>
</forms:form>