Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
 <table cellpadding="1" border="0" id="minhaTabela" class="table table-condensed" cellspacing="0" width="100%" >
                            <thead class="fixedHeader">
                                <tr bgcolor="${cortop}">
                                    <th width="20">&nbsp;</th>
                                    <th width="70">Prontu&aacute;rio</th>
                                    <th width="269"><b>pacientes</b></th>
                                    <th width="181"><b>Plano</b></th>
                                </tr>
                            </thead>
                            <c:forEach var="item" items="${pacientes}">
                                <tr bgcolor="#F4F4F4" title="${item.titlo}">
                                    <td >
                                        <input type="radio" name="radio" id="radio" value="radio" onclick="selecionar('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" ondblclick="selecionar2('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" />
                                    </td>
                                    <td>${item.id}</td>
                                    <td nowrap="nowrap">${item.nome}&nbsp;&nbsp;&nbsp;</td>
                                    <td nowrap="nowrap">${item.plano}</td>
                                </tr>
                            </c:forEach></table>
 <table cellpadding="1" border="0" id="minhaTabela" class="table table-condensed" cellspacing="0" width="100%" >
                            <thead class="fixedHeader">
                                <tr bgcolor="${cortop}">
                                    <th width="20">&nbsp;</th>
                                    <th width="70">Prontu&aacute;rio</th>
                                    <th width="269"><b>pacientes</b></th>
                                    <th width="181"><b>Plano</b></th>
                                </tr>
                            </thead>
                            <c:forEach var="item" items="${pacientes}">
                                <tr bgcolor="#F4F4F4" title="${item.titlo}">
                                    <td >
                                        <input type="radio" name="radio" id="radio" value="radio" onclick="selecionar('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" ondblclick="selecionar2('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" />
                                    </td>
                                    <td>${item.id}</td>
                                    <td nowrap="nowrap">${item.nome}&nbsp;&nbsp;&nbsp;</td>
                                    <td nowrap="nowrap">${item.plano}</td>
                                </tr>
                            </c:forEach></table>
 <table cellpadding="1" border="0" id="minhaTabela" class="table table-condensed" cellspacing="0" width="100%" >
   <thead class="fixedHeader">
     <tr bgcolor="${cortop}">
       <th width="20">&nbsp;</th>
       <th width="70">Prontu&aacute;rio</th>
       <th width="269"><b>pacientes</b></th>
       <th width="181"><b>Plano</b></th>
     </tr>
   </thead>
   <c:forEach var="item" items="${pacientes}">
     <tr bgcolor="#F4F4F4" title="${item.titlo}">
       <td >
         <input type="radio" name="radio" id="radio" value="radio" onclick="selecionar('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" ondblclick="selecionar2('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" />
       </td>
       <td>${item.id}</td>
       <td nowrap="nowrap">${item.nome}&nbsp;&nbsp;&nbsp;</td>
       <td nowrap="nowrap">${item.plano}</td>
     </tr>
   </c:forEach></table>
Fonte Link

Atualizar Tabela com filtro usando jquery

Bom dia estou procurando soluções para uma demanda, mas só encontrei em php. Sou novo em Jquery, Ajax... Estou querendo colocar o filtro da minha tabela para ser dinâmico na medida que o usuário for digitando vai aparecendo os dados, pesquisei uma function chamada autocomplete, mas não consegui implementar.

Minha Tabela.

 <table cellpadding="1" border="0" id="minhaTabela" class="table table-condensed" cellspacing="0" width="100%" >
                            <thead class="fixedHeader">
                                <tr bgcolor="${cortop}">
                                    <th width="20">&nbsp;</th>
                                    <th width="70">Prontu&aacute;rio</th>
                                    <th width="269"><b>pacientes</b></th>
                                    <th width="181"><b>Plano</b></th>
                                </tr>
                            </thead>
                            <c:forEach var="item" items="${pacientes}">
                                <tr bgcolor="#F4F4F4" title="${item.titlo}">
                                    <td >
                                        <input type="radio" name="radio" id="radio" value="radio" onclick="selecionar('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" ondblclick="selecionar2('${item.cargo}', ${item.id}, '${item.plano}', ${item.idPlano}, '<%=request.getParameter("tipo")%>')" />
                                    </td>
                                    <td>${item.id}</td>
                                    <td nowrap="nowrap">${item.nome}&nbsp;&nbsp;&nbsp;</td>
                                    <td nowrap="nowrap">${item.plano}</td>
                                </tr>
                            </c:forEach></table>

Através deste filtro eu estou puxando os dados do BD

<label  id="lbl" style="background: ${cortop}; color: ${corletra}" class="label label-info" >Nome:</label>
<input name="jtpaciente" type="text" class="form-control" id="jtpaciente"  value="<%=request.getAttribute("paci")%>" size="74" />

Quando o usuário digita e aperta enter então é feito um submit da pagina trazendo só o nome filtrado.Teria uma solução de adicionar esse jquery ou ajax nesta table em jsp ??