|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport com.cc.framework.taglib.ScriptTagSupport com.cc.framework.taglib.controls.BaseControlTag
Base class for control tag handler
Field Summary | |
private Control |
control
The Control instance |
private ControlDesignModel |
designModel
The controls design model |
private java.lang.Object |
directValue
A direct set value |
protected org.apache.commons.logging.Log |
log
Commons Logging instance. |
private ControlPainter |
painter
The painter, which is responsible to render the control |
private HttpScope |
scope
The scope of the bean containing our underlying property. |
private static long |
serialVersionUID
Serial Version UID |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
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 | |
BaseControlTag()
Constructor |
Method Summary | |
void |
addDesignRule(DesignRule rule)
Adds a new design rule to the container |
void |
beginPaint()
Starts rendering the Control |
protected Control |
createControl()
Creates the control element |
void |
createPainter(Control ctrl)
Creates the Painter to render the Control |
protected abstract Control |
doCreateControl()
Creates the control element |
protected abstract ControlDesignModel |
doCreateDesignModel()
This method is called to create the DesignModel for the control |
int |
doEndTag()
|
int |
doStartTag()
|
void |
endPaint()
Writes the HTML-Code to the Output-Stream |
private void |
exposeScriptingVariable(Control ctrl)
Exposes the control instance as a scripting variable to the Tag body |
ClientHandler |
getClientHandler()
Returns the ClientHandler interface of the controls design model. |
Control |
getControl()
Retrieves the current Control instance. |
java.lang.String |
getDefaultAction()
Gets the default Action which should be used to forward requests from this control. |
protected ControlDesignModel |
getDesignModel()
Returns the DesignModel of the Control |
java.lang.Object |
getDirectValue()
Returns a direct set value |
HttpScope |
getHttpScope()
Returns the scope. |
PainterContext |
getPainterContext()
Returns the painter context of the control painter |
protected java.lang.Object |
lookupBean()
Retrieves the bean which holds the Display Data or Control Instance |
void |
release()
|
protected void |
releaseDesignModel()
This method gets called when the design model is not longer needed |
void |
setAction(java.lang.String action)
Sets the Action |
void |
setAjax(boolean ajax)
Directs the framework to add additional AJAX handlers to the control. |
void |
setAjax(java.lang.String ajax)
Directs the framework to add additional AJAX handlers to the column. |
void |
setBorder(java.lang.String newBorder)
Sets the Border |
void |
setDirectValue(java.lang.Object value)
Sets the direct value for this control. |
void |
setDisabled(java.lang.String disabled)
This attribute can be used to disable the control element. |
void |
setFormElement(java.lang.String flag)
Defines, if the Controls should act as a FormElement |
void |
setHeight(java.lang.String newHeight)
sets the height of the control |
void |
setHelp(java.lang.String helpId)
Associates this control with a help id |
void |
setId(java.lang.String newId)
|
void |
setLocale(java.lang.String locale)
Sets the Locale configuration for this control |
void |
setName(java.lang.String name)
Specifies the name of the Java-Bean. |
void |
setPageContext(javax.servlet.jsp.PageContext pc)
|
void |
setPermission(java.lang.String permission)
With this attribute, access to the element can be restricted. |
void |
setProperty(java.lang.String property)
Sets the Property-Attribute |
void |
setRunat(java.lang.String runat)
This attribute specifies whether, for the control element, client side JavaScript should be used, or whether the control element should work purely with Server round trips. |
void |
setScope(java.lang.String scope)
Sets the scope |
void |
setShadow(java.lang.String shadow)
Sets the shadow Attribute |
void |
setStyle(java.lang.String style)
An HTML-style. |
void |
setStyleClass(java.lang.String styleClass)
The HTML-class attribute. |
void |
setStyleId(java.lang.String styleId)
The HTML-id attribute. |
void |
setSummary(java.lang.String summary)
Sets the property that can be used for rendering to non-visual media such as speech or Braille |
void |
setTabindex(java.lang.String tabIndex)
Tabulator Index for this element |
void |
setTooltip(java.lang.String tooltip)
Sets the optional tooltip text |
void |
setTransaction(java.lang.String transaction)
Directs the framework to include a transaction token (if any) in all generated hyperlinks for this column. |
void |
setValue(java.lang.String value)
Sets the direct value for this control. |
void |
setWidth(java.lang.String newWidth)
Sets the width of the control |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, 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 |
Field Detail |
private static final long serialVersionUID
protected transient org.apache.commons.logging.Log log
private HttpScope scope
private ControlPainter painter
private ControlDesignModel designModel
private Control control
private java.lang.Object directValue
Constructor Detail |
public BaseControlTag()
Method Detail |
public void release()
release
in interface javax.servlet.jsp.tagext.Tag
Tag.release()
public void setPageContext(javax.servlet.jsp.PageContext pc)
setPageContext
in interface javax.servlet.jsp.tagext.Tag
Tag.setPageContext(PageContext pc)
protected ControlDesignModel getDesignModel()
protected abstract ControlDesignModel doCreateDesignModel()
protected void releaseDesignModel()
public ClientHandler getClientHandler()
ScriptSupport
getClientHandler
in interface ScriptSupport
ScriptSupport.getClientHandler()
protected abstract Control doCreateControl() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- If an error during bean lookup occursprotected final Control createControl() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- If an error during bean lookup occurspublic Control getControl()
protected java.lang.Object lookupBean() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- Is thrown when the bean could not be foundprivate void exposeScriptingVariable(Control ctrl)
ctrl
- The control instancepublic int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
javax.servlet.jsp.JspException
Tag.doStartTag()
public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
javax.servlet.jsp.JspException
Tag.doEndTag()
public void setPermission(java.lang.String permission) throws javax.servlet.jsp.JspException
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 framework supports the following authorization types, which, however, can be expanded at will by the application developer:
permission
- The permission to set for this control
javax.servlet.jsp.JspException
- If the argument can't be converted into an object of type
Permissionpublic void setId(java.lang.String newId)
TagSupport.setId(java.lang.String)
public void setProperty(java.lang.String property) throws javax.servlet.jsp.JspException
property
- The Property-Attribute
javax.servlet.jsp.JspException
public void setWidth(java.lang.String newWidth)
newWidth
- The Width of the Control in Pixel or %public void setHeight(java.lang.String newHeight)
newHeight
- The Heightpublic void setBorder(java.lang.String newBorder) throws javax.servlet.jsp.JspException
newBorder
- Border
javax.servlet.jsp.JspException
- If the Argument can't be converted to integerpublic void setTabindex(java.lang.String tabIndex) throws javax.servlet.jsp.JspException
tabIndex
- Tab index
javax.servlet.jsp.JspException
- If the Argument can't be converted to integerpublic void setName(java.lang.String name)
name
- Name of the Beanpublic void setStyle(java.lang.String style)
style
- An HTML-stylepublic void setStyleId(java.lang.String styleId)
styleId
- The HTML-id attributepublic void setStyleClass(java.lang.String styleClass)
styleClass
- The HTML-class attributepublic void setHelp(java.lang.String helpId)
helpId
- The Help Help id of the element. The semantic of this id is
completely in the responsibility of the applications help
systempublic void setTooltip(java.lang.String tooltip)
tooltip
- Tooltippublic void setSummary(java.lang.String summary)
summary
- specifies a description and/or structure of the object.public void setTransaction(java.lang.String transaction) throws javax.servlet.jsp.JspException
transaction
- include transaction token
javax.servlet.jsp.JspException
- If the Argument can't be converted to booleanpublic void setDisabled(java.lang.String disabled) throws javax.servlet.jsp.JspException
disabled
- Disabled-Flag
javax.servlet.jsp.JspException
- If the Argument can't be converted to booleanpublic void setScope(java.lang.String scope) throws javax.servlet.jsp.JspException
scope
- Scope
javax.servlet.jsp.JspException
- If the Argument can't be converted to HttpScopepublic HttpScope getHttpScope()
public void setAction(java.lang.String action)
action
- Action to be performedpublic void setShadow(java.lang.String shadow) throws javax.servlet.jsp.JspException
shadow
- shadow Attribute
javax.servlet.jsp.JspException
- If the Argument can't be converted to booleanpublic void setRunat(java.lang.String runat) throws javax.servlet.jsp.JspException
runat
- Specifies whether the control element should work with
(=server) or without Server round trips (=client).
javax.servlet.jsp.JspException
- If the argument can't be converted to an object of type
com.cc.framework.ui.RunAtRunAt
public java.lang.String getDefaultAction()
null
public void setFormElement(java.lang.String flag) throws javax.servlet.jsp.JspException
flag
- True, if the Controls acts as a FormElement
javax.servlet.jsp.JspException
- If the Argument can't be converted to booleanpublic void createPainter(Control ctrl)
ctrl
- Controlpublic void beginPaint() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- Error while rendering the controlpublic void endPaint() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- Error while rendering the controlpublic PainterContext getPainterContext()
public void setLocale(java.lang.String locale)
locale
- Locale Identifier or true|false
public void addDesignRule(DesignRule rule)
DesignRuleContainerTag
addDesignRule
in interface DesignRuleContainerTag
rule
- Design ruleDesignRuleContainerTag.addDesignRule(com.cc.framework.ui.model.DesignRule)
public void setValue(java.lang.String value)
property
attribute
value
- The direct valuepublic void setDirectValue(java.lang.Object value)
property
attribute
value
- The direct valuepublic java.lang.Object getDirectValue()
public void setAjax(java.lang.String ajax) throws javax.servlet.jsp.JspException
AjaxSupportTag
setAjax
in interface AjaxSupportTag
ajax
- enable AJAX
javax.servlet.jsp.JspException
- If the Argument can't be converted to booleanAjaxSupportTag.setAjax(java.lang.String)
public void setAjax(boolean ajax)
setAjax
in interface AjaxSupportTag
ajax
- enable AJAX
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |