This content has been marked as final.
Show 2 replies
-
1. Re: How inject List in Context
mirlabraga Nov 12, 2007 7:00 AM (in response to mirlabraga)"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@gmail.com"); return nomeEndereco; } /** * @param nomeEndereco the nomeEndereco to set */ @In @Factory("nomeEndereco") public void setNomeEndereco(String nomeEndereco) { this.nomeEndereco = new String("email@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 -
2. Re: How inject List in Context
pmuir Nov 12, 2007 12:19 PM (in response to mirlabraga)So one of the addresses on your mail message. Post the template.