How to implement server-side JSP

How to implement server-side JSP

gussm07gussm07 Posts: 1Questions: 0Answers: 0

Hello, I have a problem when generating my datatable in a jsp. When generating my table with records, it brings me all the information. My dataset has a total of +100k records, so it is not convenient to render it on the client side. This is my script, hoping someone can help me solve it.

<pg:pager isOffset="true" export="currentPageNumber=pageNumber,offset" scope="request" actionStruts="consarc/CargaDetalleChecklist" url="">
<table align="center" width="98%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td colspan="7" class="text_tipo4">Agenda encontrados</td>
</tr>
</table>
<table id="example" class="display dataTable" style="width:100%;" aria-describedby="example_info" align="center" width="98%" border="0" cellspacing="2" cellpadding="0">
<thead>
<tr>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Clave </th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">ARC</th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Usuario</th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Proceso</th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Area</th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Fecha creación</th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Tipo </th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Semáforo</th>
<th class="dt-orderable-asc dt-orderable-desc dt-ordering-asc">Detalle</th>
</tr>
</thead>
<tbody>
<logic:iterate id="checklistItem" name="DetalleChecklistForm" property="listachecklist" offset="offset" length="length">
<pg:item>
<tr>
<td >
<bean:write name="checklistItem" property="idCheck"/>
</td>
<td>
<bean:write name="checklistItem" property="nombreCheckList"/>
</td>
<td ><bean:write name="checklistItem" property="nombreUsuario"/></td>
<td >
<bean:write name="checklistItem" property="nombreProceso"/>
</td>
<td >
<bean:write name="checklistItem" property="nombreArea"/>
</td>
<td>
<bean:write name="checklistItem" property="fechaCreacion" format="dd/MM/yyyy"/>
</td>
<td>
<bean:write name="checklistItem" property="nombreTipoCheckList"/>
</td>
<td align="center">
<logic:notEmpty name="checklistItem" property="rutaImgSemaforo">
<bean:define id="rutaImg" name="checklistItem" property="rutaImgSemaforo"/>
<img src="<%=request.getContextPath() + rutaImg%>" align="middle">
</logic:notEmpty>
</td>
<td >
<html:link styleClass="table_color_gris2_link" action="/consarc/ForwardDetalleChecklist.do?" name="checklistItem" property="parametrosUrl">Detalle</html:link>
</td>
</tr>
</pg:item>
</logic:iterate>

  </table>
  <br>
        <%/*----------------------------------------------------------------------------------------*/%>      
        <pg:index>      
                <jsp:include page="/jsp/paginador.jsp" flush="true">
                    <jsp:param name="currentPageNumber" value="<%=currentPageNumber %>"/>
                </jsp:include>
        </pg:index>  
        <%/*----------------------------------------------------------------------------------------*/%>
        </pg:pager>
new DataTable('#example', { "lengthMenu": [100, 250, 500, 1000], "deferRender": true, "processing": false, "paginate": true, "iDisplayLength": 100, "bPaginate": true, "paginate": { "first": "Primero", "last": "Último", "next": "Siguiente", "previous": "Anterior" }, "language": { "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ registros", "sInfoFiltered": "(Información filtrada de _MAX_ total registros)", "sLengthMenu": "Mostrando _MENU_ registros por página", "sSearch": "Buscar:", "emptyTable": "No hay datos disponibles en la tabla", "infoEmpty": "Mostrando 0 a 0 de 0 registros", "loadingRecords": "Cargando...", "processing": "Procesando...", "responsive": true }, "columnDefs": [ { "orderable": false, "searchable": false, "ariaTitle": '', "targets": 0 } // Desactiva la ordenación y el filtrado en la primera columna ] })

Replies

  • kthorngrenkthorngren Posts: 21,040Questions: 26Answers: 4,894

    See this thread. I don't believe there is anyone with JSP expertise on this forum. You will need to write something the processes an ajax request and handles the server side processing protocol as documented here.

    Kevin

Sign In or Register to comment.