WeekIndex weekIndex = new WeekIndex(day);
JTimeTable table = new JTimeTable();
if (sil.daySelector(weekIndex, dayOfWeek).hasNext()) {
tableModel = new SheduleTemplateTableModel(sil, weekIndex, getAuditManager());
table.setDay(day);
System.out.println("TimeTable set day to " + day + " week:" + weekIndex);
} else {
WeekIndex planWeekIndex = new WeekIndex(weekIndex.getIndex() % sil.getWeekCount());
tableModel = new SheduleTemplateTableModel(sil, planWeekIndex, getAuditManager());
Day planDay = planWeekIndex.getDay(dayOfWeek);
table.setDay(planDay);
System.out.println("PlanTimeTable set day to " + planDay + " week:" + planWeekIndex);
}