]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - web/preview.jsp
Continued with project:
[pizzaservice-war.git] / web / preview.jsp
index dbe8eb8ef73bed6392bfb728188c6a465e95271f..ca5a32d7d14f14e58407a0d07829778c30c89dcf 100644 (file)
@@ -1,5 +1,5 @@
 <%-- 
-       Document   : order
+       Document   : preview
        Created on : 04.08.2015, 10:55:10
        Author     : Roland Haeder
 --%>
                                        </thead>
                                        <tbody class="table_body">
                                                <%
+                                               // Get Iterator
+                                               Iterator<Product> iterator = app.getAvailableProducts();
+
                                                // "Walk" through all products and unmark them as ordered
-                                               for (final Product product : app.getUnmarkedProducts(session)) {
+                                               while (iterator.hasNext()) {
+                                                       // Get product instance
+                                                       Product product = iterator.next();
+
+                                                       // Unmark it as ordered
+                                                       app.unmarkProductAsOrdered(product, session);
                                                        %>
                                                        <tr>
                                                                <td>