---------- Forwarded message ---------- From: Sergueï Cambour <s.camb...@gmail.com> Date: Thu, Dec 22, 2011 at 3:37 PM Subject: Re: inject i18 text in javascript variables (jQuery) To: "Thiago H. de Paula Figueiredo" <thiag...@gmail.com>
Thanks for your help. I have some more questions: 1. Did you miss ';' in the expression(highlighted red): @BeginRender void addJsLibs() { renderSupport.addScript("loadPass('%s', '%s','%s', '%s', '%s');", messages.get("js.error.password.not_given"), messages.get("js.error.no_confirmed_password"), messages.get("js.error.password_not_matched"), messages.get("js.error.email.not_given"), messages.get("js.error.email.wrong")); } 2. Do I need to add in the top of the class definition the include of js library like that: @IncludeJavaScriptLibrary(value={"context:/static/javascript/password.js"}) public class ForgottenPassword { ... } Thank you. On Thu, Dec 22, 2011 at 2:24 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Thu, 22 Dec 2011 10:35:13 -0200, Sergueï Cambour <s.camb...@gmail.com> > wrote: > > Taking in account that the number of classes to modify, I think I'll >> choose the first solution, - using RenderSupport. In this case, I should >> remove >> all the calls to the same js function from all the pages, right? Because >> it's up to Tapestry to inject the same call in the bottom of the page, >> right? >> > > Yep. In addition, Tapestry or not, using inline JavaScript is not a good > thing. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br >