com.softslate.commerce.customer.core
Class AppInsertTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.struts.tiles.taglib.DefinitionTagSupport
          extended by org.apache.struts.tiles.taglib.InsertTag
              extended by com.softslate.commerce.customer.core.AppInsertTag
All Implemented Interfaces:
java.io.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:
Serialized Form

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
(package private) static org.apache.commons.logging.Log log
           
private static long serialVersionUID
           
 
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
AppInsertTag()
           
 
Method Summary
protected  void doInclude(java.lang.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 Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

log

static org.apache.commons.logging.Log log
Constructor Detail

AppInsertTag

public AppInsertTag()
Method Detail

doInclude

protected void doInclude(java.lang.String uri,
                         boolean flush)
                  throws javax.servlet.ServletException,
                         java.io.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()
java.io.IOException - - Thrown by call to pageContext.include()
See Also:
AppUtils.alterURI(String, String, ServletContext)


Copyright © SoftSlate, LLC 2003–2005