Hi people,
I have a strange problem. I will send out pieces of my projects.
1 -
jsp page
[<jsp:useBean id="eletroclass" class="ITC_Systems_WEB_Package_V0.EXM_Eletrocard_S001" />
<div id="requisitante">
<label>Requisitante:</label>
<select name="requisitante1">
<c:forEach var="prof" items="${requisitante}">
<option><c:out value="${prof.nome}"></c:out></option>
</c:forEach>
</select>
</div>
<div id="tabpacientes">
<table border="0">
<tbody>
<thead>
<tr>
<th>Data</th>
<th>Hora</th>
<th>Nome</th>
<th>Sexo</th>
<th>Telefone</th>
</tr>
</thead>
<c:forEach var="tabpac" items="${pacientes}">
<tr>
<td>${tabpac.data}</td>
<td>${tabpac.hora}</td>
<td>${tabpac.nome}</td>
<td>${tabpac.sexo}</td>
<td>${tabpac.telefone}</td>
</tr>
</c:forEach>
</tbody>
</table>]
2 -
Servlet
[
for select tag work fine
PacientesDAO_W01 pcdao = new PacientesDAO_W01();
DadosPaciente dpaciente = new DadosPaciente();
System.out.println("Montando lista dos profissionais..");
List<DadosPaciente> requisitante = new ArrayList<DadosPaciente>();
System.out.println("Requisitante: " + requisitante);
dpaciente = pcdao.getConsultaPaciente(prontuario);
-----------------------------------------------------------------------
for table tag don't work
try
{
PacientesDAO_W01 pcdaoag = new PacientesDAO_W01();
List<DadosPaciente> pacientes = new ArrayList<DadosPaciente>();
pacientes = pcdaoag.getPaciente();
request.setAttribute("pacientes", pacientes);
System.out.println("Paciente: " + pacientes);
}catch (Exception ex)
{
ex.printStackTrace();
JOptionPane.showMessageDialog(null, "Erro ao tentar montar tabela.");
}]
Thanks in advance.
Cezar Apulchro.