JSP - 按价格排序

时间:2013-07-22 12:48:56

标签: java html sorting product

我有8个产品分两行(每个4个),我想让它按更高的价格降低,所以它看起来价格较高的产品价格和较低的价格产品last.how我可以实现它吗?代码示例请。< / p>

(div class =“collapsible”&gt;

      <c:forEach items="${releasesGenre.value}" var="release" varStatus="status" end="3">

        <div class="productItem">

          <c:if test="${release.affiliateThumbnail ne null}">
            <div class="af lrg" style="background:url(/resources/images/affiliates/${release.affiliateThumbnail}) no-repeat;"></div>
          </c:if>

          <div class="coverArt">
            <a class="productlink" href="/product/<str:seourl args1="${release.artist.name}" args2="${release.name}"/>?id=${release.id}">
              <img src="${ release.imagePath }" width="134" height="134" alt="<c:out value="${release.name}"/> Image" />
            </a>
          </div>
          <div class="buy">
            <a href="#" id="buy_${ release.id }">Buy</a>
          </div>

          <div class="artistName">
            <a class="productlink" href="/product/<str:seourl args1="${release.artist.name}" args2="${release.name}"/>?id=${release.id}"><c:out value="${release.artist.name}"/></a>
          </div>

          <div class="productName">
            <a class="productlink" href="/product/<str:seourl args1="${release.artist.name}" args2="${release.name}"/>?id=${release.id}"><c:out value="${release.name}"/></a>
            <%--<span class="fileType"> (${ release.fileType }) </span>--%>
          </div>

          <div class="price">
            <c:choose>
              <c:when test="${release.free}">${store.currency.htmlSymbol}FREE</c:when>
              <c:otherwise>
              ${store.currency.htmlSymbol}${release.productPrices[store.id].price} ${ release.productPrices[storeId].price }
              </c:otherwise>
            </c:choose>
          </div>

       </div>

 

0 个答案:

没有答案