[jboss-user] [JBoss Seam] - Problem sending emails from a @WebRemote function

darius.zagrean do-not-reply at jboss.com
Tue May 29 20:46:48 EDT 2007


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);
  |     }
  | }
  | 

JS Function:

  | function sendFeedback()
  | {
  | 	var feedbackManager = Seam.Component.getInstance ("feedback");
  | 	feedbackManager.sendFeedback (feedbackDialog.getData().feedbackComments);
  | }
  | 

Any ideas on what is going on wrong?

Thanks a lot,
Darius

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049565#4049565

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049565



More information about the jboss-user mailing list