if (item != null) {
// Some nice output ...
%>
- <table class="table">
- <tbody>
- <tr>
- <td class="table_data_column">
- <a href="${basePath}/basket.jsp" title="Zum Warenkorb">Warenkorb</a>
- </td>
- <td class="table_data_column">
- <%=item.getAmount()%>
- </td>
- <td class="table_data_column">
- <%=product.getTitle()%>
- </td>
- <td class="table_data_column" align="right">
- <fmt:formatNumber type="currency" minFractionDigits="2" maxFractionDigits="2" value="<%=product.getPrice()%>" />
- </td>
- </tr>
- </tbody>
- </table>
+ <table class="table">
+ <tbody>
+ <tr>
+ <td class="table_data_column">
+ <a href="${basePath}/basket.jsp" title="Zum Warenkorb">Warenkorb</a>
+ </td>
+ <td class="table_data_column">
+ <%=item.getAmount()%>
+ </td>
+ <td class="table_data_column">
+ <%=product.getTitle()%>
+ </td>
+ <td class="table_data_column" align="right">
+ <fmt:formatNumber type="currency" minFractionDigits="2" maxFractionDigits="2" value="<%=product.getPrice()%>" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
<%
- // Then skip this item
- continue;
- }
- %>
- <form action="${basePath}/form_handler/add_item.jsp" accept-charset="utf-8" id="form" method="post">
- <table class="table">
- <tbody>
- <tr>
- <td class="table_data_column">
- <input class="submit" type="submit" name="add" value="Hinzufügen" />
- <input type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_ID%>" value="<%=product.getItemId()%>" />
- <input type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_TYPE%>" value="Product" />
- </td>
- <td class="table_data_column">
- <input class="input" type="text" name="<%=PizzaApplication.HTTP_PARAM_AMOUNT%>" size="3" maxlength="20" />
- </td>
- <td class="table_data_column">
- <%=product.getTitle()%>
- </td>
- <td class="table_data_column" align="right">
- <fmt:formatNumber type="currency" minFractionDigits="2" maxFractionDigits="2" value="<%=product.getPrice()%>" />
- </td>
- </tr>
- </tbody>
- </table>
- </form>
+ } else {
+ %>
+ <form action="${basePath}/form_handler/add_item.jsp" accept-charset="utf-8" id="form" method="post">
+ <table class="table">
+ <tbody>
+ <tr>
+ <td class="table_data_column">
+ <input class="submit" type="submit" name="add" value="Hinzufügen" />
+ <input type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_ID%>" value="<%=product.getItemId()%>" />
+ <input type="hidden" name="<%=PizzaApplication.HTTP_PARAM_ITEM_TYPE%>" value="Product" />
+ </td>
+ <td class="table_data_column">
+ <input class="input" type="text" name="<%=PizzaApplication.HTTP_PARAM_AMOUNT%>" size="3" maxlength="20" />
+ </td>
+ <td class="table_data_column">
+ <%=product.getTitle()%>
+ </td>
+ <td class="table_data_column" align="right">
+ <fmt:formatNumber type="currency" minFractionDigits="2" maxFractionDigits="2" value="<%=product.getPrice()%>" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
<%
- }
+ }
+ }
%>
</div>
</div>