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.
| Modifier and Type | Field and Description |
|---|---|
protected String |
displayTitle |
protected String |
displayType |
protected String |
property |
protected String |
propertyDisplay |
| Constructor and Description |
|---|
SearchFilterItemTag() |
| Modifier and Type | Method and Description |
|---|---|
void |
doTag() |
String |
getDisplayTitle() |
String |
getDisplayType() |
String |
getProperty() |
String |
getPropertyDisplay() |
protected String |
getUrl(Category category) |
void |
setDisplayTitle(String displayTitle) |
void |
setDisplayType(String displayType) |
void |
setProperty(String property) |
void |
setPropertyDisplay(String propertyDisplay) |
protected String property
protected String propertyDisplay
protected String displayTitle
protected String displayType
public void doTag()
throws javax.servlet.jsp.JspException,
IOException
doTag in interface javax.servlet.jsp.tagext.SimpleTagdoTag in class javax.servlet.jsp.tagext.SimpleTagSupportjavax.servlet.jsp.JspExceptionIOExceptionpublic String getProperty()
public void setProperty(String property)
public String getDisplayType()
public void setDisplayType(String displayType)
public String getDisplayTitle()
public void setDisplayTitle(String displayTitle)
public String getPropertyDisplay()
public void setPropertyDisplay(String propertyDisplay)
Copyright © 2015. All Rights Reserved.