private void populateManagementGrd(BladderManagementCollection voBladderManagement) { if (voBladderManagement != null) { GenForm.container1Container.gridManagementRow mRow; form.container1().gridManagement().getRows().clear(); for (int i=0; i<voBladderManagement.size(); i++) { BladderManagement manage = voBladderManagement.get(i); if ( manage.getIsCurrentlyActive().booleanValue() ) { mRow = form.container1().gridManagement().getRows().newRow(); mRow.setValue(manage); if (manage.getDateInserted() != null) mRow.setColDateInserted(manage.getDateInserted()); if (manage.getDateNextChange() != null) mRow.setColDateNextChange(manage.getDateNextChange()); if (manage.getMethod() != null) mRow.setColMethod(manage.getMethod()); if (manage.getSize() != null) mRow.setColSize(manage.getSize()); if (manage.getType() != null) mRow.setColType(manage.getType()); } else { BladderManagementCollection volstInActiveList = form.getLocalContext().getInActiveDeviceList(); if (volstInActiveList == null) volstInActiveList = new ims.nursing.vo.BladderManagementCollection(); volstInActiveList.add(manage); form.getLocalContext().setInActiveDeviceList(volstInActiveList); } } } }
protected void onDialogClosed(ims.framework.FormName formName, ims.framework.enumerations.DialogResult result) throws ims.framework.exceptions.PresentationLogicException { if (formName.equals(form.getForms().COE.AssessBladderManagement) && result == ims.framework.enumerations.DialogResult.OK) { // Get the medication from the global context GenForm.container1Container.gridManagementRow row; BladderManagement man = form.getGlobalContext().Nursing.getBladderManagement(); if ( !man.getIsCurrentlyActive().booleanValue())//Has been made Inactive { BladderManagementCollection lstInActiveList = form.getLocalContext().getInActiveDeviceList(); if (lstInActiveList == null) lstInActiveList = new ims.nursing.vo.BladderManagementCollection(); lstInActiveList.add(man); form.getLocalContext().setInActiveDeviceList(lstInActiveList); if (form.getLocalContext().getCurIndex() != null) form.container1().gridManagement().getRows().remove(form.getLocalContext().getCurIndex().intValue()); } else { if (form.getLocalContext().getCurIndex() == null) { row = form.container1().gridManagement().getRows().newRow(); row.setValue(man); } else { row = form.container1().gridManagement().getRows().get(form.getLocalContext().getCurIndex().intValue()); row.setValue(man); } if (man.getDateInserted() != null) row.setColDateInserted(man.getDateInserted()); if (man.getDateNextChange() != null) row.setColDateNextChange(man.getDateNextChange()); if (man.getMethod() != null) row.setColMethod(man.getMethod()); if (man.getSize() != null) row.setColSize(man.getSize()); if (man.getType() != null) row.setColType(man.getType()); } } form.container1().bRemove().setEnabled(form.container1().gridManagement().getValue()!=null); }