private void addRowToGrid(TrackingAreaForWhiteBoardConfigVo area) { if (area==null) return; grdEDLocRow row = form.grdEDLoc().getRows().newRow(); row.setcolArea(area.getAreaDisplayName()); row.setcolEDLoc(area.getEDLocation().getName()); row.setValue(area); }
@Override protected void onBtnCopyClick() throws ims.framework.exceptions.PresentationLogicException { TrackingAreaForWhiteBoardConfigVo selectedArea = getSelectedLocationFromGrid(); if (selectedArea==null) { engine.showMessage("Please select an Area"); return; } form.getGlobalContext().Emergency.setWhiteBoardConfig(domain.getEDWhiteBoardConfigByLocation(selectedArea.getEDLocation(),selectedArea)); engine.close(DialogResult.OK); }
private TrackingAreaForWhiteBoardConfigVo getSelectedLocationFromGrid() { for (int i=0;i<form.grdEDLoc().getRows().size();i++) { if (form.grdEDLoc().getRows().get(i).getcolSelect()) return form.grdEDLoc().getRows().get(i).getValue(); } return null; }