Friday, 6 September 2013

how to get table's value via spring controller

how to get table's value via spring controller

<table id="userRelative_list_table" class="tablebox">
<tbody>
<tr>
<th>relativeName</th>
<th>relativeType</th>
<th>relativeCardNo</th>
<th>action</th>
</tr>
</tbody>
</table>
$("#addRow").button().click(function() {
var insertRow = "<tr>";
insertRow = insertRow + "<td>" + relativeNameAdd.val() + "</td>";
insertRow = insertRow + "<td>" + relativeTypeAdd.val() + "</td>";
insertRow = insertRow + "<td>" + relativeCardNoAdd.val() + "</td>";
insertRow = insertRow + "<td><a href='#' onclick
='deleteRow(this)'><img src='${pageContext.request.contextPath
}/images/remove.png' title='delete'/></a></td>";
insertRow = insertRow + "</tr>";
$("#userRelative_list_table > tbody").append(insertRow);
}
});
now i hava a table ,when i click button that i can add a row append the
table. now my problem is coming. how can i get this table'value in spring
controller when i submit this table.

No comments:

Post a Comment