Estou usando o VRaptor 3.5 e tenho um método que me retorna uma lista de frutas.
Ex.:
Nome Preço Gostei
Uva 1,00 20
Como eu faria para clicar no “20” e ele virar “21” e já salvar no banco. Seria por Ajax?
<table id="frutas" >
<thead>
<tr>
<th>Nome</th>
<th>Preço</th>
<th>Gostei</th>
</tr>
</thead>
<tbody>
<c:forEach items="${frutas}" var="f">
<tr>
<td">${f.nome }</td>
<td>${f.preco}</td>
<td>${f.qtdGostei}</td>
</tr>
</c:forEach>
</tbody>
</table>