Re: Difference between renderSupport.addScript and JSON addInit(function, JSON Object)

2012-06-20 Thread baptiste
It doesn't work for me. In java : @IncludeJavaScriptLibrary({ context:static/javascript/address.js }) @Environmental private RenderSupport renderSupport; @BeginRender void addJsLibs() { log.debug(BEGIN addJsLibs); JSONObject jsonObject = new JSONObject();

Re: Difference between renderSupport.addScript and JSON addInit(function, JSON Object)

2012-06-20 Thread Steve Eynon
in address.js remove the last call to loadAddresse. i.e. just have Tapestry.Initializer.loadAddresse = function loadAddresse(jsonObject){ ... } it is probably that last surplus : loadAddresse(jsonObject); that caused the JS error ('cos there is no global function called loadAddresse) which then

Re: Difference between renderSupport.addScript and JSON addInit(function, JSON Object)

2012-01-12 Thread Javix
I found why it didn't work. I just replaced: Tapestry.Initializer.load = function loadPass(jsonObject){ } with Tapestry.Initializer.loadPass = function loadPass(jsonObject){ ... } I believed that 'load' was a maethod to call on Tapestry.Initializer object(unfortunately T API says

Re: Difference between renderSupport.addScript and JSON addInit(function, JSON Object)

2012-01-04 Thread Javix
It didn't work: Oups ... org.apache.tapestry5.runtime.ComponentEventException: A component event handler method returned the value MultiZoneUpdate[{page=org.apache.tapestry5.corelib.components.Zone@1799a64, May it's because in the javascript file the call to the load fucntion is made lie that:

Re: Difference between renderSupport.addScript and JSON addInit(function, JSON Object)

2012-01-03 Thread Thiago H. de Paula Figueiredo
On Wed, 28 Dec 2011 14:40:12 -0200, Javix s.camb...@gmail.com wrote: In javascript, I just replaced arguments by jsonObject: function load(jsonObject){ ... //acces to the variable in JSON errorText.text(jsonObject.m2) } Why in case of JSON it DOES NOT WORK ? From the addInit() JavaDoc,

Difference between renderSupport.addScript and JSON addInit(function, JSON Object)

2011-12-28 Thread Javix
I have a strange behavior when usin the above methods to add javascript from inside Java classes. When I use the first one like this: //java class @Inject private Messages messages; @Environmental private RenderSupport renderSupport; @BeginRender void addJsLibs() {