Use Flex, not HTML? Seriously, that seems to be a Java / HTML question, and maybe is not very interesting to many here on Flexcoders. A Java list might give better response.
Just debug it. Tracy -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Greg Morphis Sent: Monday, November 21, 2005 8:06 AM To: [email protected] Subject: [flexcoders] Re: Java ArrayList anyone?? On 11/18/05, Greg Morphis <[EMAIL PROTECTED]> wrote: > Hi, I'm working on a Flex project with a Java backend. > I'm making a JSP page (or trying to) that will output a schedule in an > HTML table. > I cant seem to get it to work > > I import all of my classes, no problem there.. > > I declare my variables, no problem there.. > It seems to be in the while loop.. > > Here's my code: > > <%@ page import="java.sql.Date" %> > <%@ page import="java.text.SimpleDateFormat" %> > <%@ page import="java.util.Iterator" %> > <%@ page import="java.util.ArrayList" %> > > <%@ page import="com.alltel.rapid.aopscheduler.dao.*" %> > <%@ page import="com.alltel.rapid.aopscheduler.business.SchedulerDelegate" %> > <%@ page import="com.alltel.rapid.aopscheduler.vo.WeeklyRowObject" %> > <%@ page import="com.alltel.rapid.aopscheduler.vo.ActivityVO" %> > <%@ page import="com.alltel.rapid.aopscheduler.vo.DailyScheduleVO" %> > <%@ page import="com.alltel.rapid.aopscheduler.vo.ScheduleEntryVO" %> > <%@ page import="com.alltel.rapid.aopscheduler.vo.WeeklyScheduleSearchVO" %> > <%@ page import="com.alltel.rapid.aopscheduler.vo.WeeklyScheduleVO" %> > > ... HTML CODE ... > > <% > String l = request.getParameter("location"); > String date = request.getParameter("date"); > > Date d = new Date(105, 10, 5); > WeeklyScheduleDAO dao; > dao = new WeeklyScheduleDAO(); > WeeklyScheduleSearchVO ws = new WeeklyScheduleSearchVO(); > SimpleDateFormat s = new SimpleDateFormat("MM/dd/yyyy"); > SimpleDateFormat hhmm = new SimpleDateFormat("hh:mm"); > > ws.setLocation("4096"); > ws.setWeekEndDate(d); > > WeeklyScheduleVO W = dao.getWeeklySchedule( ws ); > > ArrayList days = W.getScheduleDays(); > //String[] days = W.getScheduleDays(); > > > out.println("<table border='1'>"); > out.println(" <tr>"); > out.println(" <th>Employee</th>"); > out.println(" <th>Title</th>"); > out.println(" <th>Sunday</th>"); > out.println(" <th>Monday</th>"); > out.println(" <th>Tuesday</th>"); > out.println(" <th>Wednesday</th>"); > out.println(" <th>Thursday</th>"); > out.println(" <th>Friday</th>"); > out.println(" <th>Saturday</th>"); > out.println(" </tr>"); > //out.println("</table>"); > > Iterator daysIT = days.iterator(); > int i = 1; > while(daysIT.hasNext()) > { > DailyScheduleVO day = (DailyScheduleVO)daysIT.next(); > //get the entries in day i+1 > ArrayList entries = day.getEntries(); > //iterate over the entries > Iterator it = entries.iterator(); > > > int j = 1; > while(it.hasNext()) > { > //get an entry > ScheduleEntryVO entry = (ScheduleEntryVO)it.next(); > > //now get the activities in the entry > ArrayList acts = entry.getActivities(); > //iterate over the list if it has length > Iterator itt = acts.iterator(); > if(day.getDay() == 1) > { > out.println(" <tr>"); > out.println(" <td>("+ i + "," + j + ") " + > entry.name +"</td>"); > out.println(" <td>"+ entry.jobTitle +"</td>"); > } > out.println(" <td>("+ i + "," + j + ") " + > entry.timespan +"</td>"); > /* > while(itt.hasNext()) > { > //get an activity > ActivityVO act = (ActivityVO)itt.next(); > if(i == 1) { > } > } > */ > j++; > out.println(" </tr>"); > } > > i++; > > > } > out.print("</table>"); > > > %> > > > It doesnt work... it prints the 1st and 2nd and 3rd columns fine, but > the rest it prints below, and it prints only a single column > You can see an example here.. > http://home.alltel.net/omen/printws2.html > > I've tried what seems to be everything and no matter what I try I > can't seem to get it to work! > > Any help you can offer would be appreciated. > > Thanks! > > > -- > Auxilium meum a Domino > -- Auxilium meum a Domino -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> 1.2 million kids a year are victims of human trafficking. Stop slavery. http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

