Hi All,

I am trying to send a mail by calling the required method in a class which 
implements ActionHandler. But the Renderer object is not getting injected. 

This is the code i have used.

  | public class Mail implements ActionHandler {
  |    
  |     @In(create=true)
  |     private Renderer renderer;
  | 
  |     public void execute(ExecutionContext executioncontext) throws Exception 
{
  |          sendmail();
  |     }
  | 
  |     public void sendmail() {
  |          try {
  |                    renderer.render("/Mail.xhtml");
  |                } catch (Exception e) {
  |        e.printStackTrace();
  |                }
  |     }
  | }
  | 

But renderer is not getting assigned. it is always null.

                But if i call it as a seam component i.e if the class does not 
implement ActionHandler and i call the method, #{mail.sendmail} from a .xhtml 
file directly Renderer object gets assigned.

What is the problem? Is there any other way to do this?

Thanks


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045414
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to