質問編集履歴
3
該当ソースコードを変更しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,20 +7,75 @@
|
|
7
7
|
|
8
8
|
### 該当のソースコード
|
9
9
|
```ここに言語を入力
|
10
|
+
<%@ page session = "false" language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
11
|
+
<%@ page import="java.time.LocalDate" %>
|
12
|
+
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
13
|
+
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
|
14
|
+
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
15
|
+
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
16
|
+
<!DOCTYPE html>
|
17
|
+
<html>
|
18
|
+
<head>
|
19
|
+
<link rel="stylesheet" type="text/css" href="/sales/resources/common.css" />
|
20
|
+
<title>明細追加画面</title>
|
21
|
+
</head>
|
22
|
+
<body>
|
23
|
+
<form:form modelAttribute="salesForm" action="/sales/system">
|
24
|
+
<div class="header">
|
25
|
+
<span class="titleName">オンラインショップ</span>
|
26
|
+
<div class="date"><%= LocalDate.now() %></div>
|
27
|
+
</div>
|
28
|
+
<div class="main">
|
29
|
+
<span class="name">商品:</span>
|
30
|
+
<select name="name">
|
31
|
+
<c:forEach items="${itemList}" var="item" varStatus="status">
|
32
|
+
<option value="${item.name}">${item.name}</option>
|
33
|
+
</c:forEach>
|
34
|
+
</select>
|
35
|
+
<br>
|
36
|
+
<span class="quantity">点数:</span>
|
37
|
+
<form:input path="quantity" size="5" value="1" />
|
38
|
+
<div class="">
|
39
|
+
<input type="submit" name="add" value="明細追加">
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</form:form>
|
43
|
+
<form:form modelAttribute="salesForm" action="/sales/system">
|
44
|
+
<div class="main2">
|
45
|
+
<br>
|
46
|
+
<br>
|
47
|
+
<div class="message">
|
48
|
+
<c:out value="${message}" />
|
49
|
+
</div>
|
50
|
+
<br>
|
51
|
+
<br>
|
52
|
+
売上明細
|
53
|
+
<br>
|
10
|
-
<table>
|
54
|
+
<table>
|
11
|
-
|
55
|
+
<tr>
|
12
|
-
|
56
|
+
<th>削除</th><th>商品ID</th><th>商品名</th><th>単価</th><th>点数</th><th>小計</th>
|
13
|
-
|
57
|
+
</tr>
|
14
|
-
|
58
|
+
<c:forEach items="${newList}" var="newList" varStatus="status">
|
15
|
-
|
59
|
+
<tr>
|
16
|
-
|
60
|
+
<th>
|
17
|
-
|
61
|
+
<form:radiobutton path="name" label="" value="${newList.name}"/>
|
18
|
-
|
62
|
+
</th>
|
19
|
-
|
63
|
+
<th>${newList.id}</th><th>${newList.name}</th><th>${newList.price}</th>
|
20
|
-
|
64
|
+
<th>${newList.quantity}</th><th>${newList.subtotal}</th>
|
21
|
-
|
65
|
+
</tr>
|
22
|
-
|
66
|
+
</c:forEach>
|
23
|
-
</table>
|
67
|
+
</table>
|
68
|
+
合計:<fmt:formatNumber value="${total}" groupingUsed="true" />円
|
69
|
+
</div>
|
70
|
+
<div class="footer">
|
71
|
+
<input type="submit" name="delete" value="削除"/>
|
72
|
+
<input type="submit" name="fix" value="確定">
|
73
|
+
</div>
|
74
|
+
</form:form>
|
75
|
+
</body>
|
76
|
+
</html>
|
77
|
+
|
78
|
+
|
24
79
|
```
|
25
80
|
|
26
81
|
### 出力したHTML
|
2
出力したHTMLピクチャを追加しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
下記のコードでは、デフォルトで選択された状態となります。
|
7
7
|
|
8
8
|
### 該当のソースコード
|
9
|
+
```ここに言語を入力
|
9
10
|
<table>
|
10
11
|
<tr>
|
11
12
|
<th>削除</th><th>商品ID</th><th>商品名</th><th>単価</th><th>点数</th><th>小計</th>
|
@@ -19,4 +20,8 @@
|
|
19
20
|
<th>${newList.quantity}</th><th>${newList.subtotal}</th>
|
20
21
|
</tr>
|
21
22
|
</c:forEach>
|
22
|
-
</table>
|
23
|
+
</table>
|
24
|
+
```
|
25
|
+
|
26
|
+
### 出力したHTML
|
27
|
+

|
1
該当のソースコード全体を記載しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,7 +6,17 @@
|
|
6
6
|
下記のコードでは、デフォルトで選択された状態となります。
|
7
7
|
|
8
8
|
### 該当のソースコード
|
9
|
-
|
10
|
-
|
9
|
+
<table>
|
10
|
+
<tr>
|
11
|
+
<th>削除</th><th>商品ID</th><th>商品名</th><th>単価</th><th>点数</th><th>小計</th>
|
12
|
+
</tr>
|
13
|
+
<c:forEach items="${newList}" var="newList" varStatus="status">
|
14
|
+
<tr>
|
15
|
+
<th>
|
11
|
-
<form:radiobutton path="name" label="" value="${newList.name}" checked="false"/>
|
16
|
+
<form:radiobutton path="name" label="" value="${newList.name}" checked="false"/>
|
12
|
-
|
17
|
+
</th>
|
18
|
+
<th>${newList.id}</th><th>${newList.name}</th><th>${newList.price}</th>
|
19
|
+
<th>${newList.quantity}</th><th>${newList.subtotal}</th>
|
20
|
+
</tr>
|
21
|
+
</c:forEach>
|
22
|
+
</table>
|