質問編集履歴

2

ソースコード変更

2020/05/10 04:11

投稿

cout
cout

スコア13

test CHANGED
File without changes
test CHANGED
@@ -9,6 +9,38 @@
9
9
  private Date datefrom;
10
10
 
11
11
  private Date dateto;
12
+
13
+
14
+
15
+  public Date getDatefrom() {
16
+
17
+ return datefrom;
18
+
19
+ }
20
+
21
+ public void setDatefrom(Date datefrom) {
22
+
23
+ this.datefrom = datefrom;
24
+
25
+ }
26
+
27
+ public Date getDateto() {
28
+
29
+ return dateto;
30
+
31
+ }
32
+
33
+ public void setDateto(Date dateto) {
34
+
35
+ this.dateto = dateto;
36
+
37
+ }
38
+
39
+ }
40
+
41
+
42
+
43
+
12
44
 
13
45
  ```
14
46
 
@@ -52,7 +84,25 @@
52
84
 
53
85
  public ModelAndView searchresult(@ModelAttribute("searchForm") SearchForm form,BindingResult result,
54
86
 
55
- ModelAndView mav)
87
+ ModelAndView mav,Search entity){
88
+
89
+ if(result.hasErrors()) {
90
+
91
+ return mav;
92
+
93
+ }
94
+
95
+    mav.setViewName("searchresult");
96
+
97
+ mav.addObject("searchForm", new SearchForm());
98
+
99
+     Iterable<Kakeibo> list = service.searchAll(form);
100
+
101
+   mav.addObject("datalist", list);
102
+
103
+ return mav;
104
+
105
+ }
56
106
 
57
107
  ```
58
108
 

1

画像の追加

2020/05/10 04:11

投稿

cout
cout

スコア13

test CHANGED
File without changes
test CHANGED
@@ -55,3 +55,5 @@
55
55
  ModelAndView mav)
56
56
 
57
57
  ```
58
+
59
+ ![イメージ説明](1edc7a23c4a544f699e9e635799180cc.jpeg)