This content has been marked as final.
Show 1 reply
-
1. Re: Set Javascript callback scope in Seam Remoting
schlegel Apr 19, 2008 1:58 PM (in response to staticr)Hi
You have a closure problem. Try it this way:
MyJSClass = { x: 'Hello', someFunction: function() { this.x = this.x + ', World!'; var self = this; Seam.Components .getInstance('someComponent') .someMethod(arg, self.callback); }, callback: function(response) { alert(this.x + response); } };
in closures you have always problems with the 'this' keyword.