PDA

View Full Version : Ext.ux.Plugin.RemoteComponent



demon222
22 Apr 2011, 12:41 AM
Does the solution was introduced to replace extjs4 plug Ext.ux.Plugin.RemoteComponent

Maybe the plug has been rewritten by someone?

evant
22 Apr 2011, 4:53 AM
Check out the loader config on AbstractComponent. It's handled within the library now.

demon222
26 Apr 2011, 6:09 AM
ok

hmm, my modules are made ​​in the function, as I call it?



(function(){
....
return ....
})()






new Ext.Component({
loader: {
url: 'myPage.php',
renderer: function(loader, response, active) {
var text = response.responseText;
loader.getTarget().update('The response is ' + text);
return true;
}
}
});



Regards

kveeiv
26 Apr 2011, 6:41 AM
Your response.responseText needs to be evaluated so that the function that comes back in your response actually executes.



var returnVal = eval(response.responseText);
// if returnVal is a component for example, you can now do loader.getTarget().add(returnVal);

demon222
27 Apr 2011, 1:05 AM
it works,
thank you

Radek