If your site supports multiple selection values for facets, you need to code your JSPs accordingly. For example, consider these lines that display a facet and its selection value:

<c:out value="${currentFacetValue.facet.label}:"/>
<c:out value=" ${currentFacetValue.value}"/>

This code assumes that the value property of a FacetValue object is a single value. If a facet actually has multiple selection values, the code will display only one value. So, for example, if the current selections for the Color facet are Blue, Green, and Red, this code would display:

Color: Blue

To display all of the selection values, your JSP code should treat the FacetValue.value property as an array. For example:

<c:out value="${currentFacetValue.facet.label}:"/>
<c:forEach items="${currentFacetValue.value}" var="currentMultiValue">
  <c:out value=" ${currentMultiValue}"/>
</c:forEach>

For the Color facet, this will display:

Color: Blue Green Red

Note that code for handling multiple selection values will work even when there is only a single selection value for a facet, so it is not necessary to write separate code to handle each case.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices