我有以下数据以表格形式显示。当我点击更新按钮时,所有名称字段都变成输入形式,而我只希望在显示更新按钮的地方输入该特定记录。在这种情况下该怎么做?
<display:column title="Name" >
<c:choose>
<c:when test="${param.button == 'Update'}">
<input type="input" name="name" value="${record.name}"/>
</c:when>
<c:otherwise>
<c:out value="${record.name}"></c:out>
</c:otherwise>
</c:choose>
</display:column>
<display:column media="html">
<c:choose>
<c:when test="${param.button == 'Update' }">
<input type="hidden" name="name" value="${record.name}" />
<input type="submit" name="button" value="Save" />
</c:when>
<c:otherwise>
<input type="submit" name="button" value="Update" />
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${param.button == 'Update' }">
<input type="submit" name="button" value="Cancel" />
</c:when>
<c:otherwise>
<input type="button" value="View"/>
</c:otherwise>
</c:choose>
</display:column>
</display:table>