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