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 java.lang.String property
propertyDisplay
protected java.lang.String propertyDisplay
displayTitle
protected java.lang.String displayTitle
displayType
protected java.lang.String displayType
SearchFilterItemTag
public SearchFilterItemTag()
doTag
public void doTag()
throws javax.servlet.jsp.JspException,
java.io.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
java.io.IOException
getUrl
protected java.lang.String getUrl(Category category)
getProperty
public java.lang.String getProperty()
setProperty
public void setProperty(java.lang.String property)
getDisplayType
public java.lang.String getDisplayType()
setDisplayType
public void setDisplayType(java.lang.String displayType)
getDisplayTitle
public java.lang.String getDisplayTitle()
setDisplayTitle
public void setDisplayTitle(java.lang.String displayTitle)
getPropertyDisplay
public java.lang.String getPropertyDisplay()
setPropertyDisplay
public void setPropertyDisplay(java.lang.String propertyDisplay)
Copyright © 2012. All Rights Reserved.