Hi,
I'm trying to use Renderer to send out an email from inside a WebRemote function and I get this exception: java.lang.UnsupportedOperationException. If I call the function from jsf using a button's action it works so I'm almost sure that it has something to do with @WebRemote.
Here are a few code snippets:
Java function:
@WebRemote
public void sendFeedback(String message)
{
this.message = message;
try
{
renderer.render("/WEB-INF/email-templates/feedback.jsf");
}
catch (Exception e)
{
log.error(e);
}
}
function sendFeedback()
{
var feedbackManager = Seam.Component.getInstance ("feedback");
feedbackManager.sendFeedback (feedbackDialog.getData().feedbackComments);
}
I ended up injecting JavaMail directly and now everything works correctly (not the best solution but it gets the job done). Any ideas on why Renderer doesn't work inside @WebRemote?