org.broadleafcommerce.core.web.catalog.taglib
Class SearchFilterItemTag
java.lang.Object
javax.servlet.jsp.tagext.SimpleTagSupport
org.broadleafcommerce.core.web.catalog.taglib.SearchFilterItemTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag
public class SearchFilterItemTag
- extends javax.servlet.jsp.tagext.SimpleTagSupport
The SearchFilterItemTag renders form elements designed to help filter a list of products. There
are two different filter options currently implemented: multiSelect and sliderRange.
multiSelect, the default displayType, renders an unordered list of the unique values for properties.
Each item consists of a checkbox, a string containing either the string representation of the property
or, if set, the propertyDisplay property of a product. Javascript is also rendered that makes clicking on
the strings check the corresponding checkbox as well as apply the css class 'searchFilterDisabledSelect'
to unchecked options.
sliderRange relies on the designated property being of type Money and renders a jQuery slider with
minimum and maximum values corresponding to the minimum and maximum values of the property. The slider renders
with javascript that causes 2 text input boxes to be updated with the values of the slider after each change.
After all changes, the javascript function updateSearchFilterResults will be called, this funciton should
be defined before the SearchFilterTag.
| Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport |
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
property
protected String property
propertyDisplay
protected String propertyDisplay
displayTitle
protected String displayTitle
displayType
protected String displayType
SearchFilterItemTag
public SearchFilterItemTag()
doTag
public void doTag()
throws javax.servlet.jsp.JspException,
IOException
- Specified by:
doTag in interface javax.servlet.jsp.tagext.SimpleTag- Overrides:
doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
- Throws:
javax.servlet.jsp.JspException
IOException
getUrl
protected String getUrl(Category category)
getProperty
public String getProperty()
setProperty
public void setProperty(String property)
getDisplayType
public String getDisplayType()
setDisplayType
public void setDisplayType(String displayType)
getDisplayTitle
public String getDisplayTitle()
setDisplayTitle
public void setDisplayTitle(String displayTitle)
getPropertyDisplay
public String getPropertyDisplay()
setPropertyDisplay
public void setPropertyDisplay(String propertyDisplay)
Copyright © 2013. All Rights Reserved.