Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/91.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JSP-按价格排序_Java_Html_Sorting_Product - Fatal编程技术网

Java JSP-按价格排序

Java JSP-按价格排序,java,html,sorting,product,Java,Html,Sorting,Product,我有8个产品在两行(每行4个),我想让它排序按较高的价格到较低的,所以它看起来较高的价格产品首先和较低的价格产品最后。我如何才能实现它?请代码示例 (div class=“可折叠”> ${store.currency.htmlSymbol}免费 ${store.currency.htmlSymbol}${release.productPrices[store.id].price}${release.productPrices[storeId].price} 获取产品详细信息时,您可以使用o

我有8个产品在两行(每行4个),我想让它排序按较高的价格到较低的,所以它看起来较高的价格产品首先和较低的价格产品最后。我如何才能实现它?请代码示例

(div class=“可折叠”>


${store.currency.htmlSymbol}免费
${store.currency.htmlSymbol}${release.productPrices[store.id].price}${release.productPrices[storeId].price}

获取产品详细信息时,您可以使用order by。好主意,让我试试这种方式,谢谢Butani。
      <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>