@RequestMapping("mostraChamadoLogs")
public String mostra(int id,Model model){
ChamadoDAO dao = new ChamadoDAO();
model.addAttribute("chamado",dao.buscaPorId(id));
List<Chamado> chamado = dao.buscaLogId(id);
model.addAttribute("chamadoLogs ",dao.buscaLogId(id));
return "chamados/addLogsChamado";
}
<html>
<form action="" name="forms">
<label> IDCHAMADO:</label><h3>${chamado.idchamado}</h3>
<br/>
<label> Status:</label><h3>${chamado.status}</h3>
<br/>
<label>titulo</ label >:< h3 >${chamado. titulochamdo
}</ h3>
<br/>
< label >chamado</ label >:< h3>${chamado. descricaochamado
}</ h3>
<table>
<tr>
<td>Status</td>
<td>titulo</td>
<td>log</td>
<td> </td>
<tr>
<c:forEach items="${chamadoLogs}" var= "logschamado" varStatus="i">
<tr>
<td>${ logschamado.status }</td>
<td>${ logschamado.titulo}</td>
<td>${ logschamado.descricao }</td>
<td><a href="#example" onclick="javascript:buscaLogDetalhado( ${chamado.idLog})">Detalhe</a>
</td>
<tr>
</ c:forEach>
<table>
<form>
</html>
<html>
<head>
<!-- Article: http://www.paulrhayes.com/2011-03/css-modal/ -->
<!-- Demo: http://www.paulrhayes.com/experiments/modal/ -->
<!-- Originally posted: 17th March 2011 -->
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="stylesheet" href="css/experiment-styles.css" type="text/css" media="screen" title="default" />
<link rel="stylesheet" href="css/experiment.css" />
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>
<body class="experiment">
<div id="wrapper">
<aside id="example" class="modal">
<div>
<div class="flash">
<div class="banner">
<p><h11>Detalhe do Logs</h11></p>
</div>
</div>
<br/>
<table border="0" bordercolor=B2B2B2 style="background-color:#B2B2B2" width="100%" cellpadding="3" cellspacing="2">
<tr>
<td><h11>Solicitante</h11></td>
<td><h11>Data / Hora</h11></td>
<td><h11>Status</h11></td>
</tr>
<tr>
<td bordercolor=E5E5E5 style="background-color:#E5E5E5">${ chamadoLogDetalhe .nomeSolicitante}</td>
<td bordercolor=E5E5E5 style="background-color:#E5E5E5"><fmt:formatDate value ="${log.data.time}" pattern="dd-MM-yyyy hh:mm:ss" /></td>
<td bordercolor=E5E5E5 style="background-color:#E5E5E5">${ chamadoLogDetalhe .staturAcao}</td>
</tr>
</table>
<br/>
<table border="0" bordercolor="B2B2B2" style="background-color:#B2B2B2" width="100%" cellpadding="3" cellspacing="2">
<tr>
<td><h11>Titulo</h11></td>
</tr>
<tr>
<td bordercolor=E5E5E5 style="background-color:#E5E5E5">${ chamadoLogDetalhe .tituloLog}</td>
</tr>
</table>
<br/>
<table border="0" bordercolor="B2B2B2" style="background-color:#B2B2B2" width="100%" cellpadding="3" cellspacing="2">
<tr>
<td><h11>Descrição</h11></td>
</tr>
<tr>
<td bordercolor=E5E5E5 style="background-color:#E5E5E5">
${ chamadoLogDetalhe.descricao}
</td>
</tr>
</table>
<p style="font-family:verdana,arial,sans-serif;font-size:10px;">ECLIPSE-NET</p>
<a href="#close" title="Close">Close</a>
</div>
</aside>
<aside id="example2" class="modal">
<div>
<h2>Another modal box</h2>
<a href="#close" title="Close">Close</a>
</div>
</aside>
</div>
</body>
</html>
Quando ele eu clico em detalhe eu gostaria que ele carrega-se os detalhe do log referente ao chamado.
Isso tudo está numa unica JSP
comecei a fazer RequestMapping mais tem dado varios erros.@RequestMapping("mostraDetalheLog")
public String mostraDetalheLog(int idlog){
ChamadoDAO dao = new ChamadoDAO();
model.addAttribute("chamadoLogDetalhe",dao.buscaLogId(Id));
return "chamados/addLogsChamado"; ??????? Aqui ferra tudo!rs
;
}
Tudo os metodos antes de chegar no @Controller estão ok ...
Será que tenho que usar ajax pra isso ?