protected String getRichTextEditorJsLang() { Locale locale = ActionContext.getContext().getLocale(); return locale == null ? "enlll" : (locale.getLanguage().toLowerCase()); }
/** * Determines what to do if an invalida token is provided. If the action implements {@link ValidationAware} * * @param invocation the action invocation where the invalid token failed * @return the return code to indicate should be processed * @throws Exception when any unexpected error occurs. */ protected String handleInvalidToken(ActionInvocation invocation) throws Exception { Object action = invocation.getAction(); String errorMessage = LocalizedTextUtil.findText(this.getClass(), "webwork.messages.invalid.token", invocation.getInvocationContext().getLocale(), "The form has already been processed or no token was supplied, please try again.", new Object[0]); if (action instanceof ValidationAware) { ((ValidationAware) action).addActionError(errorMessage); } else { log.warn(errorMessage); } return INVALID_TOKEN_CODE; }
LOG.warn(LocalizedTextUtil.findText(TokenHelper.class, "webwork.internal.invalid.token", ActionContext.getContext().getLocale(), "Form token {0} does not match the session token {1}.", new Object[]{ token, sessionToken }));
&& !DATETAG_PROPERTY.equals(globalFormat)) { msg = new SimpleDateFormat(globalFormat, ActionContext.getContext().getLocale()) .format(date); } else { msg = DateFormat.getDateTimeInstance( DateFormat.MEDIUM, DateFormat.MEDIUM, ActionContext.getContext().getLocale()) .format(date); .getContext().getLocale()).format(date);
File directory = new File(systemId.substring(0, systemId.lastIndexOf(File.separator))); parameters.put("reportDirectory", directory); parameters.put(JRParameter.REPORT_LOCALE, invocation.getInvocationContext().getLocale());
if (log.isDebugEnabled()) { ActionProxy proxy = invocation.getProxy(); log.debug(getTextMessage("webwork.messages.bypass.request", new Object[]{proxy.getNamespace(), proxy.getActionName()}, ActionContext.getContext().getLocale())); for (int index = 0; index < files.length; index++) { if (log.isInfoEnabled()) { log.info(getTextMessage("webwork.messages.current.file", new Object[]{inputName, contentType[index], fileName[index], files[index]}, ActionContext.getContext().getLocale())); if ( acceptFile(files[index], contentType[index], inputName, validation, ac.getLocale())) { parameters.put(inputName, files); parameters.put(inputName + "ContentType", contentType); log.error(getTextMessage("webwork.messages.invalid.file", new Object[]{inputName}, ActionContext.getContext().getLocale())); log.error(getTextMessage("webwork.messages.invalid.content.type", new Object[]{inputName}, ActionContext.getContext().getLocale())); for (int index = 0; index < file.length; index++) { File currentFile = file[index]; log.info(getTextMessage("webwork.messages.removing.file", new Object[]{inputValue, currentFile}, ActionContext.getContext().getLocale()));
parameters.putAll(actionParametersMap); parameters.put(JRParameter.REPORT_LOCALE, _invocation.getInvocationContext().getLocale()); LayoutManager layoutManagerObj = getLayOutManagerObj(_invocation);
parameters.putAll(actionParametersMap); parameters.put(JRParameter.REPORT_LOCALE, _invocation.getInvocationContext().getLocale()); LayoutManager layoutManagerObj = getLayOutManagerObj(_invocation);