|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.jsp.tagext.TagSupport | +--javawebparts.ajaxparts.taglib.AjaxEnableTag
This class is a custom tag (AjaxEnableTag) that must be placed on a page AFTER all other Ajax-enabled tags. Its job is to render Javascript or external reference links for all the handlers required on the page. Each Ajax-enabled tag that fires will add its request, response and error handlers in PageContext. In this class we iterate over those collections and for each standard handler we render its code, or we render a link to the external .js file for custom handlers, if their location is not local.
Field Summary | |
private java.lang.String |
debug
What level of debugging should be done? |
private static org.apache.commons.logging.Log |
log
Log instance. |
private java.lang.String |
logger
What logger implementation to use. |
private boolean |
suppress
Flag: When set to true, the JWPWindowLogger and AjaxPartsTaglib objects will NOT be rendered, only the applicable handlers, and the attach() calls, will be rendered. |
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 | |
AjaxEnableTag()
Constructor. |
Method Summary | |
private java.lang.String |
createErrorRegisterCall(java.lang.String code,
java.lang.String groupRef,
java.lang.String elementRef,
java.lang.String type,
java.lang.String function)
Create the registration call for the error handler. |
private java.lang.String |
createRegisterCall(AjaxHandlerConfig handler)
Create the registration call for the handler. |
int |
doStartTag()
Render the results of the tag. |
java.lang.String |
getDebug()
Accessor for debug. |
java.lang.String |
getLogger()
Accessor for logger. |
void |
setDebug(java.lang.String inDebug)
Mutator for debug. |
void |
setLogger(java.lang.String inLogger)
Mutator for logger. |
void |
setSuppress(boolean inSuppressFlag)
Set the suppress flag of the tag. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static org.apache.commons.logging.Log log
private boolean suppress
private java.lang.String debug
private java.lang.String logger
Constructor Detail |
public AjaxEnableTag()
Method Detail |
public void setLogger(java.lang.String inLogger)
inLogger
- New value for logger.public java.lang.String getLogger()
public void setDebug(java.lang.String inDebug)
inDebug
- New value for debug.public java.lang.String getDebug()
public void setSuppress(boolean inSuppressFlag)
inSuppressFlag
- suppress flag of the tagpublic int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- If anything goes wrongprivate java.lang.String createRegisterCall(AjaxHandlerConfig handler)
handler
- the handler configuration.
private java.lang.String createErrorRegisterCall(java.lang.String code, java.lang.String groupRef, java.lang.String elementRef, java.lang.String type, java.lang.String function)
code
- the error code.groupRef
- the group reference.elementRef
- the element reference.type
- the type of event.function
- the error function.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |