如何在JSP页面中动态插入带有复选框的标签?

时间:2010-11-22 15:22:14

标签: java jsp

添加新列时,如何在jsp页面中插入标签?以下是示例代码:

<td class="col-1">
    <dsp:getvalueof var="pv_orderview" param="element" idtype="java.lang.Object" />
    <dsp:input type="checkbox" id="${pv_count}" name="ordersCsv" bean="ActivityHistoryFormHandler.csvValues" value="${pv_orderview.orderDate},${pv_orderview.orderId},${pv_orderview.orderTotal},${pv_orderview.status}" />
</td>

1 个答案:

答案 0 :(得分:2)

如果我正确理解了这个问题:

<td class="col-1">
    <dsp:getvalueof var="pv_orderview" param="element" idtype="java.lang.Object" />
    <label for="${pv_count}">Label content here</label>
    <dsp:input type="checkbox" id="${pv_count}" name="ordersCsv" bean="ActivityHistoryFormHandler.csvValues" value="${pv_orderview.orderDate},${pv_orderview.orderId},${pv_orderview.orderTotal},${pv_orderview.status}" />
</td>