__tabView : null,
todo1: function() {
this.__tabView = new qx.ui.tabview.TabView();
this.add(this.__tabView);
// create Tab Pages
var args = ...
var req = new qx.io.request.Xhr("/hrm/services/ActionServlet2", "POST");
req.setRequestData({
'class' : 'ApplicationDAO',
'method' : 'queryCompany',
*'async' : false*,
'args' : args
});
req.addListener("success", function(e) {
var req = e.getTarget();
var str = req.getResponse();
var obj = eval('(' + str + ')'); // *Here, the json object is : [
{companyName : "A"}, {companyName : "E"} ]*
// Create Tab Pages according with companyName
for(var i=0; i<obj.length; i++) {
var page = new qx.ui.tabview.Page(obj[i].companyName);
this.__tabView.add(page);
}
}, this);
req.send();
// In Here, If I want to execute the following code after
the 'io.request.Xhr' return successfully, how should I do ?
this.todo2();
},
todo2: function() {
var pages = this.__tabView.getChildren();
console.log("pages.length : " + pages.length); // Here, Print '0'. If
I want to get '2', how should I do ?
}
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel