JSP Bean w/List Iterator and DataTables Not working for me. [FIXED]-UserError

JSP Bean w/List Iterator and DataTables Not working for me. [FIXED]-UserError

jdkidajdkida Posts: 5Questions: 0Answers: 0
edited May 2011 in General
So its my first time using DataTables and for my intial test I just hardcoded some data into a table and it worked great. However I would really like to use it for a project I am working on for my job. I am using JSP, and an Oracle SQL database. I have a servlet that runs and extracts all the information I need, usually comes back with about 2000 rows, which i break up into different tabs.

My problem with DataTables is that only the first row of data is being brought into DataTables... all the other rows are still visible... but they cant be sorted, searched ect..

The bean is actually an arraylist that i use Iterator with and go through and pull out all the data... which works it displays on my page.. however only 1 row of data gets put into DataTables.

Here is my code.. can someone tell me where I am going wrong.. or will it just not work the way I am trying to do it with a Java Bean.

[code]
<%@ page language="java"
contentType="text/html;
charset=US-ASCII"
pageEncoding="US-ASCII" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.util.*, java.util.Date,com.nextiva.porting.*, java.sql.*" %>













Port Tracker



$(document).ready(function() {
$( "#tabs" ).tabs();
$('.portingtable').dataTable();
});


$(document).ready(function() {
$( "#tabs" ).tabs();
$('.portingtable').dataTable();
});



<%
portuser.portingList();
PortingBean portBean = null;
Iterator portIterator = portuser.getNo_paper_wrk().iterator();
%>



Corp Acct
Company Name
Name
Contact
Phone Number
Carrier
PON
Customer Submit Date
Step Description
FOC Date
Customer Request Date


<%

portBean = null;
portIterator = portuser.getNo_paper_wrk().iterator();
while (portIterator.hasNext()) {
portBean = (PortingBean) portIterator.next();
%>


<%=portBean.getCorp_acct_nbr()%>
<%=portBean.getCorpname()%>
<%=portBean.getFirstname()%> <%=portBean.getLastname()%>
<%=portBean.getEmail_address()%>
<%=portBean.getPhone_number()%>
<%=portBean.getCarrier_name() %>
<%=portBean.getPON_number() %>
<%=portBean.getSubmit_date() %>
<%=portBean.getCurrent_step()%> - <%=portBean.getStep_desciption()%>
<%=portBean.getFoc_date()%>
<%=portBean.getRequest_date()%>

<%
}
%>


[/code]

Is there any chance of getting this working with JSP and the iterator?

Thanks for any help guys!

Replies

  • jdkidajdkida Posts: 5Questions: 0Answers: 0
    Nevermind.. stupid questions.. sorry to bother anyone who read this. My while loop was inside was before my so it was creating a whole bunch of tbody elements.
This discussion has been closed.