/** * Check before exiting. * 1/ Traverse module to check that no pending changes need to be forwarded * 2/ Traverse asynchronous executor to check that none if them are still alive * @param context * The context. * @return the i18n message to display or null */ protected String checkBeforeExitFrontAction(IActionHandler actionHandler, Map<String, Object> context) { StringBuilder sb = new StringBuilder(); if (hasDirtyModules(actionHandler, context)) { sb.append(getTranslationProvider(context).getTranslation( "module.content.dirty.message", getLocale(context))); } if (hasAliveAsynchronousExecutors(actionHandler, context)) { if (sb.length()>0) { sb.append("<br/>"); } sb.append(getTranslationProvider(context).getTranslation( "asynchronous.tasks.alive.message", getLocale(context))); } return sb.length()==0 ? null : sb.toString(); }