Class AppInsertTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.struts.tiles.taglib.DefinitionTagSupport
org.apache.struts.tiles.taglib.InsertTag
com.softslate.commerce.customer.core.AppInsertTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, org.apache.struts.tiles.taglib.ComponentConstants, org.apache.struts.tiles.taglib.PutListTagParent, org.apache.struts.tiles.taglib.PutTagParent

public class AppInsertTag extends org.apache.struts.tiles.taglib.InsertTag
Extension of the Tiles InsertTag, to allow for custom layouts. Before including a new tile, this tag first checks to see if it exists under the user's custom layout directory. (See the "Creating a Custom Layout" chapter of the User Guide.)
Author:
David Tobey
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.struts.tiles.taglib.InsertTag

    org.apache.struts.tiles.taglib.InsertTag.DirectStringHandler, org.apache.struts.tiles.taglib.InsertTag.InsertHandler, org.apache.struts.tiles.taglib.InsertTag.TagHandler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static org.apache.commons.logging.Log
     
    private static final long
     

    Fields inherited from class org.apache.struts.tiles.taglib.InsertTag

    attribute, beanName, beanProperty, beanScope, cachedCurrentContext, definitionName, flush, isErrorIgnored, name, pageContext, processEndTag, ROLE_DELIMITER, tagHandler

    Fields inherited from class org.apache.struts.tiles.taglib.DefinitionTagSupport

    controllerName, controllerType, page, role

    Fields inherited from class javax.servlet.jsp.tagext.TagSupport

    id

    Fields inherited from interface org.apache.struts.tiles.taglib.ComponentConstants

    COMPONENT_CONTEXT, COMPONENT_SCOPE, EXCEPTION_KEY, LOCALE_KEY

    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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doInclude(String uri, boolean flush)
    Override the regular forward to use the file in the user's custom layout, if it exists.

    Methods inherited from class org.apache.struts.tiles.taglib.InsertTag

    createTagHandler, doEndTag, doStartTag, getBeanName, getBeanProperty, getBeanScope, getDefinitionName, getFlush, getIgnore, getName, getPageContext, processAsDefinitionOrURL, processAttribute, processBean, processDefinition, processDefinitionName, processName, processNestedTag, processNestedTag, processObjectValue, processTypedAttribute, processUrl, putAttribute, putAttribute, release, releaseInternal, setAttribute, setBeanName, setBeanProperty, setBeanScope, setComponent, setDefinition, setFlush, setFlush, setIgnore, setName, setPageContext, userHasRole

    Methods inherited from class org.apache.struts.tiles.taglib.DefinitionTagSupport

    getControllerName, getControllerType, getPage, getRole, getTemplate, setController, setControllerClass, setControllerName, setControllerType, setControllerUrl, setPage, setRole, setTemplate

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • log

      static org.apache.commons.logging.Log log
  • Constructor Details

    • AppInsertTag

      public AppInsertTag()
  • Method Details

    • doInclude

      protected void doInclude(String uri, boolean flush) throws javax.servlet.ServletException, IOException
      Override the regular forward to use the file in the user's custom layout, if it exists. Replaces pages matching AppUtils.systemLayoutDirectory with the user's custom layout directory. If the resulting page doesn't map to an existing file, uses the original instead.

      This same process happens in BaseRequestProcessor to handle forwards coming from the Struts request.

      Overrides:
      doInclude in class org.apache.struts.tiles.taglib.InsertTag
      Parameters:
      uri - The page that will be included (as defined in the Tiles definition XML files)
      Throws:
      javax.servlet.ServletException - - Thrown by call to pageContext.include()
      IOException - - Thrown by call to pageContext.include()
      See Also: