protected void initValidationScriptGroupBoxCaption() { setValidationScriptGroupBoxCaption(reportDs.getItem().getValidationOn()); reportDs.addItemPropertyChangeListener(e -> { boolean validationOnChanged = e.getProperty().equalsIgnoreCase("validationOn"); if (validationOnChanged) { setValidationScriptGroupBoxCaption(e.getItem().getValidationOn()); } }); }
protected boolean crossValidateParameters() { boolean isValid = true; if (BooleanUtils.isTrue(inputParametersFrame.getReport().getValidationOn())) { try { reportParameterValidator.crossValidateParameters(inputParametersFrame.getReport(), inputParametersFrame.collectParameters()); } catch (ReportParametersValidationException e) { NotificationType notificationType = NotificationType.valueOf(clientConfig.getValidationNotificationType()); showNotification(messages.getMainMessage("validationFail.caption"), e.getMessage(), notificationType); isValid = false; } } return isValid; }
@Override public void onBeforeDetach(Report entity, EntityManager entityManager) { if (persistence.getTools().isLoaded(entity, "xml") && StringUtils.isNotBlank(entity.getXml())) { Report reportFromXml = reportingApi.convertToReport(entity.getXml()); entity.setBands(reportFromXml.getBands()); entity.setInputParameters(reportFromXml.getInputParameters()); entity.setReportScreens(reportFromXml.getReportScreens()); entity.setRoles(reportFromXml.getRoles()); entity.setValuesFormats(reportFromXml.getValuesFormats()); entity.setValidationOn(reportFromXml.getValidationOn()); entity.setValidationScript(reportFromXml.getValidationScript()); setRelevantReferencesToReport(entity); sortRootChildrenBands(entity); } }