回答編集履歴
3
colnameをつっこむ部分の修正。
answer
CHANGED
@@ -13,13 +13,13 @@
|
|
13
13
|
<%
|
14
14
|
String colname = "row[" + index + "].col[" + col_idx + "]";
|
15
15
|
%>
|
16
|
-
<td><html:text name="
|
16
|
+
<td><html:text name="testForm" property="<%= colname%>" /></td>
|
17
17
|
</logic:iterate>
|
18
18
|
</tr>
|
19
19
|
</logic:iterate>
|
20
20
|
</table>
|
21
21
|
```
|
22
|
-
あるいは
|
22
|
+
あるいはcolnameの部分。
|
23
23
|
```Java
|
24
24
|
String colname = "row[" + index + "].col_name" + (col_idx+1) + "";
|
25
25
|
```
|
2
再度編集しました。
answer
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
<td><html:text name="row" property="code" indexed="true" /></td>
|
12
12
|
<logic:iterate id="col" name="testForm" property="cols" indexId="col_idx">
|
13
13
|
<%
|
14
|
-
String colname = "row[" + index + "].
|
14
|
+
String colname = "row[" + index + "].col[" + col_idx + "]";
|
15
15
|
%>
|
16
16
|
<td><html:text name="row" property="<%= colname%>" /></td>
|
17
17
|
</logic:iterate>
|
@@ -19,6 +19,13 @@
|
|
19
19
|
</logic:iterate>
|
20
20
|
</table>
|
21
21
|
```
|
22
|
+
あるいは
|
23
|
+
```Java
|
24
|
+
String colname = "row[" + index + "].col_name" + (col_idx+1) + "";
|
25
|
+
```
|
22
26
|
|
27
|
+
でもいいかも?
|
28
|
+
colsの構造がわからないので…
|
29
|
+
|
23
30
|
参考URL
|
24
31
|
[[Struts] logic:iterateの入れ子について - 旧@IT会議室](http://www.atmarkit.co.jp/bbs/phpBB/viewtopic.php?forum=12&topic=17617)
|
1
rowの下が想定している結果とおそらく違うので修正。
answer
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
<td><html:text name="row" property="code" indexed="true" /></td>
|
12
12
|
<logic:iterate id="col" name="testForm" property="cols" indexId="col_idx">
|
13
13
|
<%
|
14
|
-
String colname = "row[" + index + "].
|
14
|
+
String colname = "row[" + index + "].col_name" + col_idx + "";
|
15
15
|
%>
|
16
16
|
<td><html:text name="row" property="<%= colname%>" /></td>
|
17
17
|
</logic:iterate>
|