「Spring MVC入門」c:forEach varStatusの使い方

Javaコード
<c:forEachitems=”${command.modelList}” var=”model”varStatus=”changfa”>
<tr>
<td><c:outvalue=”${changfa.count}”/></td>
<td class=”model”>
<form:checkbox path=”select”value=”${changfa.index}”/>
<labelfor=”model1″>${model.modelName}</label>
<p>${model.modelDesc}</p>
</td>
<td>
<form:select path =”modelList[${changfa.index}].positionIdx”onchange=”selectPoss(this);”>
<optionvalue=””>項目選択</option>
<form:option value=”A”label=”項目A”/>
<form:option value=”B”label=”項目B”/>
<form:option value=”C”label=”項目C”/>
</form:select>
</td>
<td>
<a href=”#”onclick=”getModelDetail(${model.modelID});”><imgsrc=”<%=request.getContextPath()%>/images/edit.gif”alt=”編集”/></a>
<a href=”#”onclick=”deleteModel(${model.modelID});”><imgsrc=”<%=request.getContextPath()%>/images/delete.gif”alt=”削除” /></a>
</td>
</tr>
</c:forEach>

 

Comments are closed.