com.cc.framework.taglib.controls
Class TabTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended bycom.cc.framework.taglib.ScriptBodyTagSupport
              extended bycom.cc.framework.taglib.controls.TabTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, InnerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, ScriptSupport, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class TabTag
extends ScriptBodyTagSupport
implements InnerTag

Tag-Handler for the tab Tag.

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 -tag may only be specified within a - or -tag.

Since:
1.0
Version:
$Revision: 1.24 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  TabDesignModel designModel
          DesignModel of the TabPage
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
TabTag()
          Constructor
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
           
 int doStartTag()
           
protected  void exposeScriptingVariable(TabDesignModel tab)
          Exposes the TabDesignModel instance as a scripting variable to the Tag body
 ClientHandler getClientHandler()
          Returns the ClientHandler interface of the controls design model.
protected  TabDesignModel getTabDesignModel()
          Returns the TabDesignModel
 void release()
           
protected  void releaseTabDesignModel()
          Releases the design model model
 void setAction(java.lang.String action)
          Sets the associated action
 void setBgcolor(java.lang.String bgcolor)
          Sets the Background-Color of the TabPage
 void setContent(java.lang.String content)
          Sets the Page to be included
 void setEnable(boolean enable)
          This attribute specifies whether the tab can be selected
 void setEnable(java.lang.String enable)
          This attribute specifies whether the tab can be selected
 void setId(java.lang.String id)
           
 void setImageref(java.lang.String imageRef)
          Sets the Reference to an Image in an ImageMap, which should be display in front of the Label
 void setPageContext(javax.servlet.jsp.PageContext pc)
           
 void setPermission(boolean granted)
          Sets the permission for the tab
 void setPermission(java.lang.String permission)
          With this attribute, access to the element can be restricted.
 void setTabid(java.lang.String id)
          The unique identification of the tab.
 void setTarget(java.lang.String target)
          Sets the target where the document referenced will appear.
 void setTitle(java.lang.String title)
          The title of the tab.
 void setTooltip(java.lang.String tooltip)
          Tooltip Text that is displayed in a Popup window when the user moves the mouse over the tab.
 
Methods inherited from class com.cc.framework.taglib.ScriptBodyTagSupport
setOnabort, setOnactivate, setOnafterprint, setOnafterupdate, setOnbeforeactivate, setOnbeforecopy, setOnbeforecut, setOnbeforedeactivate, setOnbeforeeditfocus, setOnbeforepaste, setOnbeforeprint, setOnbeforeunload, setOnbeforeupdate, setOnblur, setOnbounce, setOncellchange, setOnchange, setOncheck, setOncheckall, setOnclick, setOncollapse, setOncontextmenu, setOncontrolselect, setOncopy, setOncut, setOndataavailable, setOndatasetchanged, setOndatasetcomplete, setOndblclick, setOndeactivate, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOnerror, setOnerrorupdate, setOnexpand, setOnexpandex, setOnfilterchange, setOnfinish, setOnfocus, setOnfocusin, setOnfocusout, setOnhelp, setOnkeydown, setOnkeypress, setOnkeyup, setOnlayoutcomplete, setOnload, setOnlosecapture, setOnmousedown, setOnmouseenter, setOnmouseleave, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnmove, setOnmoveend, setOnmovestart, setOnpaste, setOnpropertychange, setOnreadystatechange, setOnreset, setOnresize, setOnresizeend, setOnresizestart, setOnrowenter, setOnrowexit, setOnrowsdelete, setOnrowsinserted, setOnscroll, setOnselect, setOnselectionchange, setOnselectstart, setOnspindown, setOnspinup, setOnstart, setOnstop, setOnsubmit, setOnuncheck, setOnuncheckall, setOnunload
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

designModel

private TabDesignModel designModel
DesignModel of the TabPage

Constructor Detail

TabTag

public TabTag()
Constructor

Method Detail

getTabDesignModel

protected TabDesignModel getTabDesignModel()
Returns the TabDesignModel

Returns:
TabDesignModel

releaseTabDesignModel

protected void releaseTabDesignModel()
Releases the design model model


setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pc)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.setPageContext(PageContext pc)

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
See Also:
Tag.release()

getClientHandler

public ClientHandler getClientHandler()
Description copied from interface: ScriptSupport
Returns the ClientHandler interface of the controls design model.

Specified by:
getClientHandler in interface ScriptSupport
Returns:
ClientHandler
See Also:
ScriptSupport.getClientHandler()

exposeScriptingVariable

protected void exposeScriptingVariable(TabDesignModel tab)
Exposes the TabDesignModel instance as a scripting variable to the Tag body

Parameters:
tab - The Design Model

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doStartTag()

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException
See Also:
IterationTag.doAfterBody()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspException
See Also:
Tag.doEndTag()

setId

public void setId(java.lang.String id)
See Also:
TagSupport.setId(java.lang.String)

setTabid

public void setTabid(java.lang.String id)
The unique identification of the tab. With this id, the control element determines whether the tab is selected.

Parameters:
id - The id of the TabPage

setTitle

public void setTitle(java.lang.String title)
The title of the tab.

Parameters:
title - The title of the tab.

setTooltip

public void setTooltip(java.lang.String tooltip)
Tooltip Text that is displayed in a Popup window when the user moves the mouse over the tab.

Parameters:
tooltip - The tooltip

setEnable

public void setEnable(java.lang.String enable)
               throws javax.servlet.jsp.JspException
This attribute specifies whether the tab can be selected

Parameters:
enable - false if the TabPage can not be selected
Throws:
javax.servlet.jsp.JspException - if the Argument can not be converted into a boolean value

setEnable

public void setEnable(boolean enable)
This attribute specifies whether the tab can be selected

Parameters:
enable - false if the TabPage can not be selected

setContent

public void setContent(java.lang.String content)
Sets the Page to be included

Parameters:
content - Page to be included (e.g. Pag1.jsp)

setBgcolor

public void setBgcolor(java.lang.String bgcolor)
Sets the Background-Color of the TabPage

Parameters:
bgcolor - Background-Color

setImageref

public void setImageref(java.lang.String imageRef)
Sets the Reference to an Image in an ImageMap, which should be display in front of the Label

Parameters:
imageRef - Reference to an Image in an ImageMap

setAction

public void setAction(java.lang.String action)
Sets the associated action

Parameters:
action - Action

setPermission

public void setPermission(java.lang.String permission)
                   throws javax.servlet.jsp.JspException
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

Parameters:
permission - The permission to set for this control
Throws:
javax.servlet.jsp.JspException - If the argument can't be converted intoan object of type Permission

setPermission

public void setPermission(boolean granted)
Sets the permission for the tab

Parameters:
granted - permission

setTarget

public void setTarget(java.lang.String target)
Sets the target where the document referenced will appear. (like _blank, _parent, ...). If you use this method each hyperlinks in each row will use the same target value. If you want to use different targets you have to use a property which gets the target from your datamodel. Therefore you can specify the property with the setTargetProperty() method.

Parameters:
target - The target where the document referenced will appear


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.