problemas com essa exceção java.lang.IllegalStateException.
02/02/2015 16:57
java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
List oArgs = [];
Map oModel = ['messages': []];
oArgs = [oAtendimento_ti.id, oAtendimento_ti, oAtendimento_ti.solicitacao, oAtendimento_ti.solucao, oAtendimento_ti.atendente, oAtendimento_ti.fechamento];
oModel.messages = [Aplicacao.internacionalize("email.atendimento.ti", sMensagem, oArgs)];
protected static def g;
/**
* internacionaliza uma mensagem usando o i18n
*
* @param _sCode REQUIRED - The code to resolve the message for. Used for custom application messages.
* @param _sDefault (optional) - The default message to output if the error or code cannot be found in messages.properties.
* @param _args (optional) - A list of argument values to apply to the message when code is used.
* @return a Mensagem internacionalizada
*/
public static String internacionalize(String _sCode, String _sDefault, List _args) {
g = g?: grails.util.Holders.applicationContext.getBean( 'org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib' );
return g.message(code: _sCode, default: _sDefault, args: _args);
}
Para se registrar, clique aqui.