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 d
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();
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
On Fri, 06 Jan 2012 13:48:58 -0200, Javix wrote:
One more question:
How to trigger the exectution of js function.
Just call it.
For exmaple, before the code
was like that directly n the tml page:
One more question:
How to trigger the exectution of js function. For exmaple, before the code
was like that directly n the tml page:
Some hard-coded
meessage
Finally I got it working by adding as you told:
Tapestry.Initializer.load = function load(jsonObject){
..
errorText.text(jsonObject.m1)
}
and ot in the very begining of the call:
jQuery(document).bind(Tapestry.ZONE_UPDATED_EVENT, function(e){
//load(m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m
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:
On Wed, 28 Dec 2011 14:40:12 -0200, Javix 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, specifically the first p
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() {
Strin