[jboss-user] [JBoss Seam] - Re: How inject List in Context

mirlabraga do-not-reply at jboss.com
Mon Nov 12 07:00:23 EST 2007


"mirlabraga" wrote : How inject List on Context?
  | 
  | I want inject a List of Object on Context of the apllication. However happen error.
  | 
  |  
  |   | 
  |   | @Name("mailExample")
  |   | @Scope(ScopeType.SESSION)
  |   | public class MailExample
  |   | {
  |   | 
  |   | @In
  |   |     @Out(scope=ScopeType.CONVERSATION)
  |   |     private List<Object> enderecos = null;
  |   | 
  |   | // Ação do botão enviar
  |   |    public void send()
  |   |     {
  |   |         try
  |   |         {
  |   |             getNomeEndereco();
  |   |             renderer.render("/simple.xhtml");
  |   |             facesMessages.add("Email sent successfully");
  |   |         } catch (Exception e)
  |   |         {
  |   |             log.error("Error sending mail", e);
  |   |             facesMessages.add(FacesMessage.SEVERITY_INFO, "Email sending failed: " + e.getMessage());
  |   |         }
  |   |     }
  |   | 
  |   |  /**
  |   |      * @return the nomeEndereco
  |   |      */
  |   |     @Out
  |   |     public String getNomeEndereco()
  |   |     {
  |   |         nomeEndereco = new String("bragamoveis at gmail.com");
  |   |         
  |   |         return nomeEndereco;
  |   |     }
  |   | 
  |   |     /**
  |   |      * @param nomeEndereco the nomeEndereco to set
  |   |      */
  |   |     @In
  |   |     @Factory("nomeEndereco")
  |   |     public void setNomeEndereco(String nomeEndereco)
  |   |     {
  |   |         this.nomeEndereco = new String("email at gmail.com");
  |   |     }
  |   | 
  |   | 


The error:


  | Caused by: javax.mail.internet.AddressException: Missing final '@domain' in string ``''
  | 

No found the string....because Itsn't on context.

Help me 

Please

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

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




More information about the jboss-user mailing list