private void populateLocationServices(TreeNode node, LocShortVo voLocation) { LocationServiceMidVoCollection voLocationServices; voLocationServices = domain.listLocationServiceLite(voLocation); TreeNode childServiceNode = null; clearServiceNodes(node); for (int i = 0; i < voLocationServices.size(); i++) { if (voLocationServices.get(i).getServiceIsNotNull()) { childServiceNode = node.getNodes().add(voLocationServices.get(i), (voLocationServices.get(i).getService().getServiceNameIsNotNull() ? voLocationServices.get(i).getService().getServiceName() : "")); childServiceNode.setTooltip(formatLocationServicevoTooltip(voLocationServices.get(i))); childServiceNode.setExpandedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service); childServiceNode.setCollapsedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service); childServiceNode.setSelectedImage(voLocationServices.get(i).getIsActiveIsNotNull() ? (voLocationServices.get(i).getIsActive().booleanValue() ? form.getImages().Admin.Service : form.getImages().Admin.ServiceInactive) : form.getImages().Admin.Service); childServiceNode.sortChildrenByText(); childServiceNode.setExpanded(false); } } node.setExpanded(true); form.lyr1().Details().chkHTMLActiveOnly().setValue(true); form.lyr1().Details().htmDetails().setHTML(getDetailsAsTextile(node)); }
public LocationServiceMidVoCollection listLocationServiceLite(LocationRefVo voLocation) { DomainFactory factory = getDomainFactory(); if (voLocation == null) return LocationServiceMidVoAssembler.createLocationServiceMidVoCollectionFromLocationService(factory.listDomainObjects(LocationService.class)).sort(); if (voLocation.getID_LocationIsNotNull()) { java.util.List servactList = factory.find("from LocationService locService where locService.location.id = :locationId", new String[]{"locationId"}, new Object[]{voLocation.getID_Location()}); return LocationServiceMidVoAssembler.createLocationServiceMidVoCollectionFromLocationService(servactList).sort(); } return null; }