com.ibm.commerce.pagelayout.cache

Class PageLayoutCacheTag

  • java.lang.Object
    • javax.servlet.jsp.tagext.TagSupport
      • com.ibm.commerce.pagelayout.cache.PageLayoutCacheTag
  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag


    public class PageLayoutCacheTag
    extends javax.servlet.jsp.tagext.TagSupport
    This tag class is used to assist in adding dependencyId's to the layout JSP cache entries. This class will dynamically set dependency IDs to invalidate the cached JSP when the layout design changes. (Either new widgets are added or existing widgets removed, widgets properties modified etc.,) The dependency Ids generated will have the format pageLayoutId:id. LayoutId is read either from pageLayoutId attribute set on the tag or from pageDesign data object set on the tag.

    Here is an example of including this tag on the layout JSP:

      <wcpgl:pageLayoutCache pageDesignData="${pageDesignData}" />
     
    OR
      <wcpgl:pageLayoutCache pageLayoutId="${layoutId}" />
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASS_NAME
      The name of this class.
      static java.lang.String COPYRIGHT
      COPYRIGHT
      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int doEndTag()
      This method performs no actions.
      int doStartTag()
      If valid pageLayoutId is set or if a valid pageLayoutId can be retrieved from pageDesignData object, then this method sets the dependency id in the format pageLayoutId:id to the top level JSP
      void setPageDesignData(com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType dataVar)
      This method sets the page design data returned from the Get PageDesign service call.
      void setPageId(java.lang.String id)
      This method sets the page Id of content pages
      void setPageLayoutId(java.lang.String id)
      This method sets the layout Id
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        The name of this class.
    • Constructor Detail

      • PageLayoutCacheTag

        public PageLayoutCacheTag()
    • Method Detail

      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspTagException
        If valid pageLayoutId is set or if a valid pageLayoutId can be retrieved from pageDesignData object, then this method sets the dependency id in the format pageLayoutId:id to the top level JSP
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.TagSupport
        Returns:
        Always returns the SKIP_BODY constant.
        Throws:
        javax.servlet.jsp.JspTagException
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspTagException
        This method performs no actions.
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.TagSupport
        Returns:
        Always returns the EVAL_PAGE constant.
        Throws:
        javax.servlet.jsp.JspTagException
      • setPageDesignData

        public void setPageDesignData(com.ibm.commerce.pagelayout.facade.datatypes.PageDesignType dataVar)
        This method sets the page design data returned from the Get PageDesign service call.
        Parameters:
        dataVar - The page design data.
      • setPageLayoutId

        public void setPageLayoutId(java.lang.String id)
        This method sets the layout Id
        Parameters:
        id - The layout Id.
      • setPageId

        public void setPageId(java.lang.String id)
        This method sets the page Id of content pages
        Parameters:
        id - The page id.