org.broadleafcommerce.cms.web.structure
Class DisplayContentTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.broadleafcommerce.cms.web.structure.DisplayContentTag
- All Implemented Interfaces:
- Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class DisplayContentTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
Tag used to display structured content that is maintained with the Broadleaf CMS.
Usage based on the following attributes:
- contentType (required) - specifies the content you are retrieving
- contentName - if included will retrieve only content that matches the name. When no name is specified,
all matching content items of the passed in type are retrieved.
- count - if specified limits the results to a specified number of items. The content will be returned
according to priority. If content items share the same priority, then they will be returned
randomly. Consider the example with 5 matching items with priorities (1,2,3,3,3) respectively. If
the count is set to 3. Items 1 and 2 will ALWAYS be returned. The third item returned will
randomy rotate through the 3rd, 4th, and 5th item.
- contentListVar - allows you to specify an alternate name for the list of content results. By default,
the results are returned in the page attributed "contentList"
- contentItemVar - since a typical usage is to only return one item, the first item is returned in the
variable "contentItem". This variable can be used to change the attribute name.
- numResultsVar - variable holding the returns the number of results being returned to through the tag-lib.
defaults to "numResults".
- locale - the locale being targeted for the content. Defaults to locale that exists in
the requestAttribute "blLocale". This is typically setup through Broadleaf's
ProcessURLFilter.
- See Also:
- Serialized Form
| 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 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 |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doInitBody, 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 |
BLC_RULE_MAP_PARAM
public static final String BLC_RULE_MAP_PARAM
- See Also:
- Constant Field Values
REQUEST_DTO
public static final String REQUEST_DTO
- See Also:
- Constant Field Values
DisplayContentTag
public DisplayContentTag()
initServices
protected void initServices()
isSecure
public boolean isSecure(javax.servlet.http.HttpServletRequest request)
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
getContentType
public String getContentType()
setContentType
public void setContentType(String contentType)
getContentName
public String getContentName()
setContentName
public void setContentName(String contentName)
getCount
public Integer getCount()
setCount
public void setCount(Integer count)
getContentListVar
public String getContentListVar()
setContentListVar
public void setContentListVar(String contentVar)
getContentItemVar
public String getContentItemVar()
setContentItemVar
public void setContentItemVar(String contentItemVar)
getNumResultsVar
public String getNumResultsVar()
setNumResultsVar
public void setNumResultsVar(String numResultsVar)
getLocale
public Locale getLocale()
setLocale
public void setLocale(Locale locale)
getProduct
public Object getProduct()
setProduct
public void setProduct(Object product)
Copyright © 2012. All Rights Reserved.