private void open() { clear(); form.setMode(FormMode.VIEW); populateScreenFromData(domain.getEnvironmentalVisit(form.getGlobalContext().Therapies.getEnvironmentalVisit())); RoomDetailsVoCollection tempvoColl = domain.getRoomDetails(form.getGlobalContext().Therapies.getEnvironmentalVisit()); //wdev-13576 - dummy get from database to display RIE icon resetUpdatedChild(); showButtonsForRecord(); form.ctnDetails().setCollapsed(true); if (form.getLocalContext().getvoRoomDetails() != null) { try { onGrdRoomsSelectionChanged(); } catch (PresentationLogicException e) { engine.showMessage("Failed to display current selection."); } } }
private void populateChildNodes(RoomDetailsVoCollection collRoomDetails) { if(collRoomDetails == null)// WDEV-13649 return; for (int i = 0; i < collRoomDetails.size(); i++) { if(collRoomDetails.get(i) == null)// WDEV-13649 continue; GenForm.gridRoomsRow row = form.gridRooms().getRows().newRow(); populateChildNode(row, collRoomDetails.get(i)); if(form.getLocalContext().getRoomDetail() != null && collRoomDetails.get(i).getID_RoomDetails().equals(form.getLocalContext().getRoomDetail().getID_RoomDetails()))// WDEV-13649 { form.getLocalContext().setRoomDetail(collRoomDetails.get(i)); } } }
private void populateChildNodes(RoomDetailsVoCollection voRoomDetailsColl) { if (voRoomDetailsColl == null || voRoomDetailsColl.size() <= 0) return; voRoomDetailsColl.sort(); for (int i = 0; i < voRoomDetailsColl.size(); i++) { GenForm.grdRoomsRow row = form.grdRooms().getRows().newRow(); populateChildNode(row, voRoomDetailsColl.get(i)); } }
private void populateChildCollectionFromGrid(EnvironmentalVisitVo voEnvironmentalVisit) { if (voEnvironmentalVisit.getRooms() == null) voEnvironmentalVisit.setRooms(new RoomDetailsVoCollection()); if (form.grdRooms().getRows().size() > 0) voEnvironmentalVisit.getRooms().clear(); for (int i = 0; i < form.grdRooms().getRows().size(); i++) { voEnvironmentalVisit.getRooms().add(form.grdRooms().getRows().get(i).getValue()); } }
private void populateChildCollectionFromGrid(HomeVisitVo voHomeVisit) { if (voHomeVisit.getRooms() == null) voHomeVisit.setRooms(new RoomDetailsVoCollection()); if (form.gridRooms().getRows().size() > 0) voHomeVisit.getRooms().clear(); for (int i = 0; i < form.gridRooms().getRows().size(); i++) { voHomeVisit.getRooms().add(form.gridRooms().getRows().get(i).getValue()); } }
public RoomDetailsVoCollection getRoomDetails(EnvironmentalVisitRefVo recordRef) { if( recordRef == null) return null; String hql = new String("select r1_1 from EnvironmentalVisit as e1_1 left join e1_1.rooms as r1_1 where (e1_1.id = :VISITID) "); java.util.List list = getDomainFactory().find(hql, "VISITID", recordRef.getID_EnvironmentalVisit()); return RoomDetailsVoAssembler.createRoomDetailsVoCollectionFromRoomDetails(list); }
public RoomDetailsVoCollection listRooms(HomeVisitRefVo homeVisit) { if(homeVisit == null || homeVisit.getID_HomeVisit() == null) throw new CodingRuntimeException("Cannot get Rooms on null HomeVisit Id."); DomainFactory factory = getDomainFactory(); String query = "select r from HomeVisit as hv left join hv.rooms as r where hv.id = :HomeVisit"; List<?> list = factory.find(query, new String[] {"HomeVisit"}, new Object[] {homeVisit.getID_HomeVisit()}); return RoomDetailsVoAssembler.createRoomDetailsVoCollectionFromRoomDetails(list); }