The Common-Controls Tag Library

<ctrl:tab>

Generates a tab for a tabset control element. The contents of the tab can be specified either directly in the tag-body or in the form of a JSP-Include.
The <tab>-tag may only be specified within a <tabset>- or <tabbar>-tag.

Body content: JSP
Tag class: TabTag
Tei class: TabTei
 

[ Syntax ]

Standard Syntax
<ctrl:tab
title = "String"
[ action = "String" ]
[ bgcolor = "String" ]
[ content = "String" ]
[ enable = "boolean" ]
[ id = "String" ]
[ imageref = "String" ]
[ onblur = "String" ]
[ onchange = "String" ]
[ onclick = "String" ]
[ oncontextmenu = "String" ]
[ ondblclick = "String" ]
[ onfocus = "String" ]
[ onkeydown = "String" ]
[ onkeypress = "String" ]
[ onkeyup = "String" ]
[ onmousedown = "String" ]
[ onmousemove = "String" ]
[ onmouseout = "String" ]
[ onmouseover = "String" ]
[ onmouseup = "String" ]
[ permission = "ACL" ]
[ tabid = "String" ]
[ target = "String" ]
[ tooltip = "String" ]
>
...Body Content...

</ctrl:tab>
 

[ Attributes ]

AttributeTypeDescriptionReq.RTExp
actionString Specifies the Struts action which should be executed upon selection of the tab by the user. If no action has been specified, the action of the enclosing <tabset>-tag is called.

Annotation: The action must be declared in one of the Struts-config.xml files.

 
bgcolorString Specifies the background color of the tab. Every tab can thus be displayed in a different color.

Caution: fFor the specified color, the corresponding image resources for the default default Painter must be present - Beispiel /fw/def/image/tab/tabLSel_<<COLORNAME>>.gif

Annotation: A valid HTML color code must be specified. This can be a color code such as #ff0000 or a color name like e.g. Red.

 
contentString The actual body of the tab can be specified in two ways:
  • Directly within the <tab></tab>-tag
  • As a pointer to another JSP-Page. The pointer is specified in the content-attribute.

Annotation: Must point to a valid Web resource.

 
enableboolean This attribute specifies whether the tab can be selected.  
idString The name of a page scope JSP bean that will contain the current element. Using the given Id, the variable can be accessed in scripting expressions in the tag Body. The id mus be a string lteral because the JSP compiler generates a variable withthis name at compile time

Annotation: A valid Java identifier must be given.

 
imagerefString Pointer to an element of the Imagemap of the Tabset. The image is drawn before the label of the tab.

The Painter implicitly appends to the imageref-value the suffixes .sel bzw. .unsel, to be able to distinguish between the selected and unselected state.

 
onblurString Fires when the object loses the input focus.

Annotation: JavaScript Code

 
onchangeString Fires when the contents of the object or selection have changed.

Annotation: JavaScript Code

 
onclickString Fires when the user clicks the left mouse button on the object.

Annotation: JavaScript Code

 
oncontextmenuString Fires when the user clicks the right mouse button in the client area, opening the context menu.

Annotation: JavaScript Code

 
ondblclickString Fires when the user double-clicks the object.

Annotation: JavaScript Code

 
onfocusString Fires when the object receives focus.

Annotation: JavaScript Code

 
onkeydownString Fires when the user presses a key.

Annotation: JavaScript Code

 
onkeypressString Fires when the user presses an alphanumeric key.

Annotation: JavaScript Code

 
onkeyupString Fires when the user releases a key.

Annotation: JavaScript Code

 
onmousedownString Fires when the user clicks the object with either mouse button.

Annotation: JavaScript Code

 
onmousemoveString Fires when the user moves the mouse over the object.

Annotation: JavaScript Code

 
onmouseoutString Fires when the user moves the mouse pointer outside the boundaries of the object.

Annotation: JavaScript Code

 
onmouseoverString Fires when the user moves the mouse pointer into the object.

Annotation: JavaScript Code

 
onmouseupString Fires when the user releases a mouse button while the mouse is over the object.

Annotation: JavaScript Code

 
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

 
tabidString The unique identification of the tab. With this id, the control element determines whether the tab is selected.  
targetString The HTML-target attribute of the element can be specified with this attribute.

Annotation: See HTML documentation for the attribute target.

 
titleString The title of the tab.

The character string is HTML-encoded before outputting.

tooltipString Tooltip Text that is displayed in a Popup window when the user moves the mouse over the tab.

The character string is HTML-encoded before outputting.

 

[ Example ]

Generates a simple Tabset with two tabs and an Imagemap.


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

<util:imagemap name="im_tabs">
    <util:imagemapping  rule="def"        src="images/imgDefault.gif"   width="13"  height="13"/>
    <util:imagemapping  rule="cor.unsel"  src="images/imgCorUnsel.gif"  width="13"  height="13"/>
    <util:imagemapping  rule="cor.sel"    src="images/imgCorSel.gif"    width="13"  height="13"/>
</util:imagemap>

<ctrl:tabset
    id="detail"
    name="detailView"
    width="100%"
    bgcolor="#dadfe0"
    imagemap="im_tabs"
    formElement="true">


    <ctrl:tab  id="DEF"  title="Default"      content="Page_Form_Def.jsp"  tooltip="Default View"  imageref="def"/>
    <ctrl:tab  id="COR"  title="Corrections"  content="Page_Form_Cor.jsp"  tooltip="Corrections"   imageref="cor"/>
</ctrl:tabset>