private void addMovementTimeRowToGrid(TrackingMovementTimesForEventHistoryVo trackingMovementTimesForEventHistoryVo) { grdMovementTimesRow newrow = form.ctnTimes().grdMovementTimes().getRows().newRow(); if (trackingMovementTimesForEventHistoryVo.getAreaMovedToIsNotNull()) { newrow.setColTrackingArea(trackingMovementTimesForEventHistoryVo.getAreaMovedTo().getAreaDisplayName()); } if (trackingMovementTimesForEventHistoryVo.getMovedDateTimeIsNotNull()) { newrow.setColTime(trackingMovementTimesForEventHistoryVo.getMovedDateTime().toString()); } newrow.setValue(trackingMovementTimesForEventHistoryVo); }
private void addMovementTimeRowToGrid(TrackingMovementTimesForEventHistoryVo trackingMovementTimesForEventHistoryVo) { grdEDMovementTimesRow newrow = form.grdEDMovementTimes().getRows().newRow(); if (trackingMovementTimesForEventHistoryVo.getAreaMovedToIsNotNull()) { newrow.setColTrackingArea(trackingMovementTimesForEventHistoryVo.getAreaMovedTo().getAreaDisplayName()); } if (trackingMovementTimesForEventHistoryVo.getMovedDateTimeIsNotNull()) { newrow.setColTime(trackingMovementTimesForEventHistoryVo.getMovedDateTime().toString()); } }
private void populateScreenFromData(TrackingMovementTimesForEventHistoryVo currentRecord) { clearScreen(); if(currentRecord == null) return; form.txtTRackingArea().setValue(currentRecord.getAreaMovedTo().getAreaDisplayName()); form.dtimMovement().setValue(currentRecord.getMovedDateTime()); }
private boolean save() { TrackingMovementTimesForEventHistoryVo record = populateDataFromScreen(form.getLocalContext().getCurrentRecord()); String[] errors = validateUIRules(); if(errors != null && errors.length > 0) { engine.showErrors(errors); return false; } errors = record.validate(); if(errors != null && errors.length > 0) { engine.showErrors(errors); return false; } try { domain.save(record); } catch (StaleObjectException e) { e.printStackTrace(); engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); engine.close(DialogResult.ABORT); return false; } return true; }
private TrackingMovementTimesForEventHistoryVo populateDataFromScreen(TrackingMovementTimesForEventHistoryVo currentRecord) { if(currentRecord == null) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); engine.close(DialogResult.ABORT); } currentRecord.setMovedDateTime(form.dtimMovement().getValue()); return currentRecord; }