protected void insertgrdAdressee(ValueObject voAdressee) { if (voAdressee == null) return; GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow(); ExternalPersonShortVo voExtPer = (ExternalPersonShortVo) voAdressee; RecipientVo exterPer = new RecipientVo(); exterPer.setCommChannels(voExtPer.getCommChannels()); exterPer.setName(voExtPer.getName()); exterPer.setAddress(voExtPer.getAddress()); exterPer.setRecipientType(RecipientType.EXTERNAL_PERSON); row.setValue(exterPer); row.setAdressee(exterPer.getName().toShortForm()); if (exterPer.getAddressIsNotNull()) row.setAddress(exterPer.getAddress().toDisplayString()); row.setGP(form.getImages().Admin.StaffYellow); }
private void populateExternalPersonTree(ExternalPersonShortVo filterVo) { ExternalPersonVoCollection extPerCollVo = domain.listExternalPerson(filterVo); if (null == extPerCollVo) return; form.treExternalPerson().clear(); if (extPerCollVo.size() > 0) { for (int i = 0; i < extPerCollVo.size() ; i++) { ExternalPersonShortVo extPerVo = extPerCollVo.get(i); TreeNode newNode = form.treExternalPerson().getNodes().add(extPerVo, extPerVo.getName().toShortForm()); newNode.setCollapsedImage(form.getImages().Admin.StaffBlack); newNode.setExpandedImage(form.getImages().Admin.StaffBlack); } } else engine.showMessage("No Person found matching that criteria."); }
private void populateExternalPersonTree() { ExternalPersonShortVo filterVo = new ExternalPersonShortVo(); PersonName name = new PersonName(); name.setSurname(form.txtSName().getValue()); filterVo.setName(name); filterVo.setIsActive(Boolean.TRUE); populateExternalPersonTree(filterVo); }
private void populateScreenFromData(ExternalPersonShortVo extPerVo) { clearDetailControls(); if (extPerVo.getNameIsNotNull()) { form.txtSurname().setValue(extPerVo.getName().getSurname()); form.txtForeName().setValue(extPerVo.getName().getForename()); form.txtMiddleName().setValue(extPerVo.getName().getMiddleName()); form.cmbTitle().setValue(extPerVo.getName().getTitle()); CommChannelVoCollection voCommChannelColl = extPerVo.getCommChannels(); GenForm.grdContactRow rowCommChannel; if (voCommChannelColl != null) { for (int i = 0; i < voCommChannelColl.size(); i++) { CommChannelVo voCommChannel = voCommChannelColl.get(i); if (voCommChannel.getChannelTypeIsNotNull()) { rowCommChannel = form.grdContact().getRows().newRow(); rowCommChannel.setcolType(voCommChannel.getChannelType()); rowCommChannel.setcolContactValue(voCommChannel.getCommValue()); rowCommChannel.setValue(voCommChannel); } } } } }
protected void onTreExternalPersonTreeViewSelectionChanged(TreeNode node) throws PresentationLogicException { if (node.getValue() instanceof ExternalPersonShortVo) { ExternalPersonShortVo voExtPer = (ExternalPersonShortVo) node.getValue(); setContextVariables(voExtPer); populateScreenFromData(voExtPer); } else { clearDetailControls(); } }
private void searchPerson() { clearInstanceControls(); form.getContextMenus().hideAllGenericGridMenuItems(); form.getContextMenus().hideAllLIPMenuItems(); form.getContextMenus().getLIPNewItem().setVisible(true); form.btnUpdate().setVisible(false); form.grdDetails().getRows().clear(); ExternalPersonShortVo voExtPer = new ExternalPersonShortVo(); PersonName voPerName = new PersonName(); voPerName.setSurname(form.txtSName().getValue()); voExtPer.setName(voPerName); voExtPer.setIsActive(new Boolean(form.chkActive().getValue())); ExternalPersonVoCollection voExtPerCol = domain.listExternalPerson(voExtPer); if ((null != voExtPerCol) && voExtPerCol.size() > 0) { for (int i = 0; i < voExtPerCol.size(); i++) { GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow(); row.setColImage(form.getImages().Core.User); row.setName(voExtPerCol.get(i).getName().toShortForm()); row.setValue(voExtPerCol.get(i)); if (!voExtPerCol.get(i).getIsActive().booleanValue()) row.setBackColor(Color.Beige); } } else engine.showMessage("No External Person found matching this search criteria."); }
private void setContextVariables(ExternalPersonShortVo extPerVo) { form.getGlobalContext().Correspondence.setExternalPerson(extPerVo); }
public ExternalPersonVoCollection listExternalPerson(ExternalPersonShortVo voExternalPersonFilter) { ExternalPersonAdmin impl = (ExternalPersonAdmin) getDomainImpl(ExternalPersonAdminImpl.class); return impl.listExternalPerson(voExternalPersonFilter); }