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

mirlabraga do-not-reply at jboss.com
Mon Nov 12 06:57:43 EST 2007


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

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

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




More information about the jboss-user mailing list