質問編集履歴
1
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -83,3 +83,107 @@
|
|
83
83
|
|
84
84
|
|
85
85
|
```
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
```Java
|
90
|
+
|
91
|
+
bb.java
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
bbの該当部分です。infoはただのエンティティになります。
|
96
|
+
|
97
|
+
@PostConstruct
|
98
|
+
|
99
|
+
public void loadPage() {
|
100
|
+
|
101
|
+
for (int i = 1940; i <= 1990; i++) {
|
102
|
+
|
103
|
+
final SelectItem item = new SelectItem();
|
104
|
+
|
105
|
+
item.setLabel(String.valueOf(i));
|
106
|
+
|
107
|
+
item.setValue(String.valueOf(i));
|
108
|
+
|
109
|
+
yearList.add(item);
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
for (int i = 1; i <= 12; i++) {
|
114
|
+
|
115
|
+
final SelectItem item = new SelectItem();
|
116
|
+
|
117
|
+
item.setLabel(String.valueOf(i));
|
118
|
+
|
119
|
+
item.setValue(String.valueOf(i));
|
120
|
+
|
121
|
+
monthList.add(item);
|
122
|
+
|
123
|
+
}
|
124
|
+
|
125
|
+
for (int i = 1; i <= 31; i++) {
|
126
|
+
|
127
|
+
final SelectItem item = new SelectItem();
|
128
|
+
|
129
|
+
item.setLabel(String.valueOf(i));
|
130
|
+
|
131
|
+
item.setValue(String.valueOf(i));
|
132
|
+
|
133
|
+
dayList.add(item);
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
coupleList = db.getAll();
|
138
|
+
|
139
|
+
columns = new ArrayList<>();
|
140
|
+
|
141
|
+
createDynamicColumns();
|
142
|
+
|
143
|
+
getPagination();
|
144
|
+
|
145
|
+
//PagenationHelper getPagination();
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
//DataTableのカラムリスト
|
152
|
+
|
153
|
+
private List<ColumnModel> columns;
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
/**
|
158
|
+
|
159
|
+
* カラム生成
|
160
|
+
|
161
|
+
*/
|
162
|
+
|
163
|
+
public void createDynamicColumns() {
|
164
|
+
|
165
|
+
columns.clear();
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
//ヘッダとエンティティの属性である変数名を記述
|
170
|
+
|
171
|
+
columns.add(new ColumnModel("id", "id"));
|
172
|
+
|
173
|
+
columns.add(new ColumnModel("名前", "firstName"));
|
174
|
+
|
175
|
+
columns.add(new ColumnModel("住んでいる地域", "addressOne"));
|
176
|
+
|
177
|
+
columns.add(new ColumnModel("丁目", "addressTwo"));
|
178
|
+
|
179
|
+
columns.add(new ColumnModel("提供できる保育の内容", "educationContent"));
|
180
|
+
|
181
|
+
columns.add(new ColumnModel("保護者の方への言葉", "message"));
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
```
|