📄 delete.jsp
字号:
<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><%@ page import="java.util.*,util.Data,model.*,util.*" %><jsp:useBean id="ob" scope="session" class="model.OrdersBean" /><jsp:useBean id="pb" scope="session" class="model.ProductsBean" /><% List<Order> all = ob.findAll(); String title = "Show Orders"; String tf = request.getParameter("tf");%><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title><%= title %></title> <style> @import url("entry.css"); table.entry td.left { width: 90px; } </style> </head> <body> <%@ include file="nav.jsp" %> <form> <table class="entry"> <tbody valign="top"> <tr> <td class="left">Please choose one:</td> <td> <select name="tf"> <option value="">Product ID</option> <% for (Order o : all) {%> <option name="tf"><%= o.getId()%></option> <% }%> </select> </td> </tr> </tbody> </table> <input type="submit" name="button" value="Display" /> </form> <blockquote class="feedback"> <% // this feedback section is primarily used for debugging if (tf != null && !tf.equals("")) { Integer id = Integer.parseInt(tf); Order o1 = ob.find(id); if (ob.find(id) != null) { for (int i = 0; i < 1; i++) { out.println("<hr />"); util.OrderHelper.printOrder(o1, pb, out); } } else { out.println("This order does not exist!"); } }else{out.println("Cannot be empty!");} %> </blockquote> <form action="DeleteOrders"> <table class="entry"> <tbody valign="top"> <tr> <td class="left">Please choose one to delete:</td> <td> <select name="tf"> <option value="">Product ID</option> <% for (Order o : all) {%> <option name="tf"><%= o.getId()%></option> <% }%> </select> </td> </tr> </tbody> </table> <input type="submit" name="raw_button" value="Delete"/> </form> <h2><%= title %></h2> <% for (Order o : all) { out.println("<hr />"); util.OrderHelper1.printOrder(o, out); } %> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -