private void open() { form.dyngrdKPI().getRows().clear(); AttendanceKPIConfigVo attendanceKpiVo = domain.getAttendanceKPIConfigVo(form.cmbEmergencyDepartment().getValue()); form.getLocalContext().setCurrentAttendanceKPIConfig(attendanceKpiVo); if(attendanceKpiVo != null) { initializeKPIDynamicGrid(); populateDynamicGrid(attendanceKpiVo); } form.setMode(FormMode.VIEW); }
protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException { form.getLocalContext().setCurrentAttendanceKPIConfig(new AttendanceKPIConfigVo()); form.setMode(FormMode.EDIT); initializeKPIDynamicGrid(); }
public AttendanceKPIConfigVo getAttendanceKPIConfig(ILocation edLocation) { if(edLocation == null) throw new CodingRuntimeException("Cannot get AttendanceKPIConfig for a null EDLocation Id."); DomainFactory factory = getDomainFactory(); String query = "select kpi from AttendanceKPIConfig as kpi left join kpi.eDLocation as loc where loc.id = :EDLoc"; List<?> list = factory.find(query, new String[] {"EDLoc"}, new Object[] {edLocation.getID()}); if(list == null || list.size() == 0) return null; return AttendanceKPIConfigVoAssembler.create((AttendanceKPIConfig) list.get(0)); }