private void populateDiscriminatorGrid(DiscriminatorConfigVoCollection discriminators) { form.grdDiscriminatorSelect().getRows().clear(); if (discriminators == null) { engine.showMessage("No Discriminators found for the search criteria."); return; } discriminators.sort(new StringComparator(SortOrder.ASCENDING)); for (int i = 0; i < discriminators.size(); i++) { grdDiscriminatorSelectRow rowDiscriminator = form.grdDiscriminatorSelect().getRows().newRow(); rowDiscriminator.setcolDiscriminatorName(discriminators.get(i).getDiscriminatorName()); rowDiscriminator.setValue(discriminators.get(i)); } }
public DiscriminatorConfigVoCollection listDiscriminators(String filter) { List<?> resultsList; try { resultsList = listItemInfo(filter); } catch (DomainInterfaceException e) { return null; } if (resultsList.size() > 0) { return DiscriminatorConfigVoAssembler.createDiscriminatorConfigVoCollectionFromDiscriminatorConfig(resultsList); } return null; }
private void populateDiscriminatorGrid(DiscriminatorConfigVoCollection discriminators) { clearScreen(); if (discriminators == null) { engine.showMessage("No Discriminators found for the search criteria."); form.getLocalContext().setSelectedItem(null); return; } // wdev-15985 discriminators.sort(new DiscriminatorComparator(SortOrder.ASCENDING)); for (int i = 0; i < discriminators.size(); i++) { grdDiscriminatorRow rowDiscriminator = form.grdDiscriminator().getRows().newRow(); if (discriminators.get(i).getIsActiveIsNotNull() && !discriminators.get(i).getIsActive()) { rowDiscriminator.setBold(false); rowDiscriminator.setTextColor(Color.Gray); } rowDiscriminator.setColDiscriminator(discriminators.get(i).getDiscriminatorName()); rowDiscriminator.setValue(discriminators.get(i)); } }
public DiscriminatorConfigVoCollection listDiscriminators(String filter, Boolean activeOnly, DiscriminatorConfigRefVo discriminatorRef) //wdev-15985 { List<?> resultsList; try { resultsList = listItemInfo(filter, activeOnly.booleanValue()); } catch (DomainInterfaceException e) { return null; } if (resultsList.size() > 0) { return DiscriminatorConfigVoAssembler.createDiscriminatorConfigVoCollectionFromDiscriminatorConfig(resultsList); } else //wdev-15985 { if( discriminatorRef != null ) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append(" select Discriminator from DiscriminatorConfig as Discriminator where Discriminator.id = :discriminatorID"); List<?> list = factory.find(hql.toString(), new String[] { "discriminatorID" }, new Object[] { discriminatorRef.getID_DiscriminatorConfig() }); if ( list != null && list.size() > 0) { DiscriminatorConfigVoCollection temp = DiscriminatorConfigVoAssembler.createDiscriminatorConfigVoCollectionFromDiscriminatorConfig(list); return temp; } } } return null; }