com.acsinet_solutions.cetia4.tags.support
Class AbstractLinkTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.acsinet_solutions.cetia4.tags.support.LogBodyTagSupport
              extended by com.acsinet_solutions.cetia4.tags.support.AbstractLinkTag
All Implemented Interfaces:
AttributeKeys, ControllerConstants, ParameterAppender, java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
FormTag, LinkTag

public abstract class AbstractLinkTag
extends LogBodyTagSupport
implements ParameterAppender, ControllerConstants

Support for classes that perform linking

Author:
Santiago Arriaga
See Also:
Serialized Form

Field Summary
 
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 com.acsinet_solutions.cetia4.controller.ControllerConstants
_METHOD_PARAM, _PAGE_PARAM, _ROOT_PARAM, DEFAULT_VIEW, ERROR_URL, ERROR_VIEW, LOAD_CANCEL, LOAD_CURRENT, LOAD_DEFAULT, LOAD_ERROR, LOAD_PREVIOUS
 
Fields inherited from interface com.acsinet_solutions.cetia4.controller.AttributeKeys
_BUNDLE_KEY, _CONFIGURATION_KEY, _DEFAULT_CONTROLLER_KEY, _FORM_ACTION_KEY, _FORM_ATTRIBUTE_KEY, _LOCALE_KEY, _MESSAGE_KEY, _NAVIGATION_FLOW_KEY, _PORTAL_PATH_KEY, _RENDER_PARAMETERS_KEY, _SERVICE_LOCATOR_KEY, _SESSION_KEY, _SYSTEM_EXCEPTION_KEY, _VALIDATION_EXCEPTION_KEY
 
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
AbstractLinkTag()
           
 
Method Summary
 void addParameter(java.lang.String key, java.lang.String value)
          Append a parameter
 int doEndTag()
           
protected  URLLink getLink()
          Get the internal link reference.
protected  boolean isActionProvided()
          Check if a link was explicitly provided
 void removeParameter(java.lang.String key)
          Remove a parameter
 void setAction(java.lang.String action)
          Sets the action, that is, the URL to which the link will be referred to.
protected  void setLink(URLLink link)
          Allows subclasses to explicitly set the link.
 void setSection(java.lang.String section)
          Sets the action section
 void writeBody()
          Write the body of the tag.
protected abstract  void writeBody(javax.servlet.jsp.JspWriter writer, java.lang.String body)
          Write the body to the JSP output
 
Methods inherited from class com.acsinet_solutions.cetia4.tags.support.LogBodyTagSupport
doCatch, doFinally, fillDynamicValues, fillDynamicValues, getConfiguration, getDynamicAttributes, getLocale, getLogger, getPortalPath, getRequest, getServletContext, getSession, setDynamicAttribute
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, 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, setPageContext, setParent
 

Constructor Detail

AbstractLinkTag

public AbstractLinkTag()
Method Detail

setAction

public void setAction(java.lang.String action)
               throws javax.servlet.jsp.JspException
Sets the action, that is, the URL to which the link will be referred to. It may be a logical #link constant.

Throws:
javax.servlet.jsp.JspException
See Also:
ControllerTools.getSpecialLink(NavigationFlow,String)

setSection

public final void setSection(java.lang.String section)
Sets the action section


addParameter

public void addParameter(java.lang.String key,
                         java.lang.String value)
Description copied from interface: ParameterAppender
Append a parameter

Specified by:
addParameter in interface ParameterAppender
Parameters:
key - A not-null String instance
value - A not-null String instance

removeParameter

public final void removeParameter(java.lang.String key)
Description copied from interface: ParameterAppender
Remove a parameter

Specified by:
removeParameter in interface ParameterAppender

doEndTag

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

writeBody

protected abstract void writeBody(javax.servlet.jsp.JspWriter writer,
                                  java.lang.String body)
                           throws javax.servlet.jsp.JspException,
                                  java.io.IOException
Write the body to the JSP output

Throws:
javax.servlet.jsp.JspException
java.io.IOException

isActionProvided

protected final boolean isActionProvided()
Check if a link was explicitly provided


setLink

protected final void setLink(URLLink link)
Allows subclasses to explicitly set the link.


getLink

protected final URLLink getLink()
                         throws javax.servlet.jsp.JspException
Get the internal link reference.

Throws:
javax.servlet.jsp.JspException

writeBody

public final void writeBody()
                     throws javax.servlet.jsp.JspException
Write the body of the tag. The actual link may have body or not, so the implementation goes as it is. Actual body printing is delegated to concrete implementations.

Throws:
javax.servlet.jsp.JspException