teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

構造の追記。

2016/08/10 02:15

投稿

apricot-works
apricot-works

スコア15

title CHANGED
File without changes
body CHANGED
@@ -63,6 +63,43 @@
63
63
  </table>
64
64
  ```
65
65
 
66
+ 各種構造は以下の通り。
67
+ ```JAVA
68
+ public class testForm extends ActionForm {
69
+ private List _rows = new ArrayList();
70
+ private List _cols = new ArrayList();
71
+ public List getRows() {
72
+ return _rows;
73
+ }
74
+ public void setRows(List rows) {
75
+ _rows = rows;
76
+ }
77
+ public RowItem getRow(int index) {
78
+ return (RowItem) _rows.get(index);
79
+ }
80
+ public List getCols() {
81
+ return _cols;
82
+ }
83
+ public void setCols(List cols) {
84
+ _cols = cols;
85
+ }
86
+ public ColItem getCol(int index) {
87
+ return (ColItem) _cols.get(index);
88
+ }
89
+ }
90
+ public class RowItem {
91
+ private String _code = "";
92
+ private String _col_name1 = "";
93
+ ・・・
94
+ private String _col_name10 = "";
95
+ }
96
+ public class ColItem {
97
+ private String _col_name = "";
98
+ private String _col_type = "";
99
+ ・・・
100
+ }
101
+
102
+ ```
66
103
  なぜかcolのループの中でrowのindexがカウントアップされてしまいます。
67
104
 
68
105
  期待通りのHTMLを出力したのですが、