private void populateGrid(DnaBatchUpdateVo batch) { //Populates the job information grid form.grdJob().getRows().clear(); //If the argument is null then we get the info from the database DnaBatchUpdateVo batchVo=null; if (batch==null) batchVo = domain.getJob(); else batchVo=batch; form.grdJob().setValue(batchVo); if (batchVo!=null) { grdJobRow row = form.grdJob().getRows().newRow(); if (batchVo.getCreationDateIsNotNull()) row.setcolCreatedOn(batchVo.getCreationDate()); if (batchVo.getTriggerFrecuencyIsNotNull()) row.setcolFrequency(batchVo.getTriggerFrecuency()); if (batchVo.getNameIsNotNull()) row.setcolJob(batchVo.getName()); if (batchVo.getLastRunIsNotNull()) row.setcolLastRun(batchVo.getLastRun().toString()); if (batchVo.getNextRunIsNotNull()) row.setcolNextRun(batchVo.getNextRun().toString()); if (batchVo.getNumAppointmentsUpdatedIsNotNull()) row.setcolNumberAppts(batchVo.getNumAppointmentsUpdated()); isRunning=true; try { SchedulerFactory sf = new StdSchedulerFactory(); Collection scheds = sf.getAllSchedulers(); Iterator<Scheduler> iter=scheds.iterator(); Scheduler scheduler=null; while (iter.hasNext()) { scheduler=iter.next(); for (int i=0; i<scheduler.getJobGroupNames().length;i++) { if (scheduler.getJobGroupNames()[i].equals("DNA")) { scheduling=scheduler; break; } } } } catch (SchedulerException e) { engine.showMessage(e.getMessage()); } } else { form.grdJob().getRows().clear(); form.grdJob().setVisible(false); isRunning=false; } }