bem pessoal, eu tenho um datatable e eu queria que quando eu clicasse nessa imagem obeto_ativo_true, ele mudasse o estado de true para false sem que mudasse de PAGINA, alguem tem algum caminho para me indicar, infelizmente venho do JSF e era muito dependente dos componentes, e como estou iniciando no action based preciso da ajuda de vocês. Obrigado.
<%@ page contentType="text/html; charset=UTF-8" %>
<script type="text/javascript">
/* Table initialisation */
$(document).ready(function() {
$('#usuarioList').dataTable({
"sDom" : "<'row'<'span8'l><'span8'f>r>t<'row'<'span8'i><'span8'p>>",
"sPaginationType": "bootstrap"
});
});
</script>
<table id="usuarioList" class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>#</th>
<th>Nome</th>
<th>Email</th>
<th>Senha</th>
<th>Permissao</th>
<th>ativo</th>
</tr>
</thead>
<tbody>
<c:forEach items="${usuarioList}" var="usuario">
<tr>
<td>${usuario.id} </td>
<td>${usuario.nome}</td>
<td>${usuario.email}</td>
<td>${usuario.senha}</td>
<td>
<c:if test="${usuario.permissao.contains('ROLE_USUARIO')}">
Usuario
</c:if>
</td>
<td>
<c:if test="${usuario.ativo == true}">
<img src="${pageContext.request.contextPath}/resources/img/objeto_ativo_true.png" alt="Ativo">
</c:if>
<c:if test="${usuario.ativo == false}">
<img src="${pageContext.request.contextPath}/resources/img/objeto_ativo_false.png" alt="False">
</c:if>
</td>
</tr>
</c:forEach>
</tbody>
</table>