Update symbols outside of App Module

2011-02-24 Thread Mark
I'm using ChenilleKitMail and I want to let end users update the SMTP
settings from the application.

So right now my AppModule has a contributeApplicationDefaults that
hard code all the values like:

// Email Setup
configuration.add(ChenilleKitMailConstants.SMTP_HOST, smtp.a.com);
configuration.add(ChenilleKitMailConstants.SMTP_PORT, 25);
configuration.add(ChenilleKitMailConstants.SMTP_DEBUG, true);
configuration.add(ChenilleKitMailConstants.SMTP_USER, a...@a.com);
configuration.add(ChenilleKitMailConstants.SMTP_PASSWORD, *);
configuration.add(ChenilleKitMailConstants.SMTP_SSL, true);
configuration.add(ChenilleKitMailConstants.SMTP_SSLPORT, 465);
configuration.add(ChenilleKitMailConstants.SMTP_TLS, true);


I want to be able to update these to different settings from a page
class. I'm assuming I can inject something into the page class to
update these symbols, but I'm not sure what to use.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Update symbols outside of App Module

2011-02-24 Thread Thiago H. de Paula Figueiredo

Tapestry-IoC symbols aren't updateable.

On Thu, 24 Feb 2011 14:17:10 -0300, Mark mark-li...@xeric.net wrote:


I'm using ChenilleKitMail and I want to let end users update the SMTP
settings from the application.

So right now my AppModule has a contributeApplicationDefaults that
hard code all the values like:

// Email Setup
configuration.add(ChenilleKitMailConstants.SMTP_HOST, smtp.a.com);
configuration.add(ChenilleKitMailConstants.SMTP_PORT, 25);
configuration.add(ChenilleKitMailConstants.SMTP_DEBUG, true);
configuration.add(ChenilleKitMailConstants.SMTP_USER, a...@a.com);
configuration.add(ChenilleKitMailConstants.SMTP_PASSWORD, *);
configuration.add(ChenilleKitMailConstants.SMTP_SSL, true);
configuration.add(ChenilleKitMailConstants.SMTP_SSLPORT, 465);
configuration.add(ChenilleKitMailConstants.SMTP_TLS, true);


I want to be able to update these to different settings from a page
class. I'm assuming I can inject something into the page class to
update these symbols, but I'm not sure what to use.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
Coordenador e professor da Especialização em Engenharia de Software com  
Ênfase em Java da Faculdade Pitágoras

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org