Hello,
I have a test function and I want to send to this function the results of an
AJAX request.
I've tried to do :
qx.Class.define("test_app.Application",
{
extend : qx.application.Standalone,
/*
*****************************************************************************
MEMBERS
*****************************************************************************
*/
members :
{
/**
* This method contains the initial application code and gets called
* during startup of the application
*
* @lint ignoreDeprecated(alert)
*/
main : function()
{
// Call super class
this.base(arguments);
// Enable logging in debug variant
if (qx.core.Variant.isSet("qx.debug", "on"))
{
// support native logging capabilities, e.g. Firebug for Firefox
qx.log.appender.Native;
// support additional cross-browser console. Press F7 to toggle
visibility
qx.log.appender.Console;
}
/*
-------------------------------------------------------------------------
Below is your actual application code...
-------------------------------------------------------------------------
*/
this.base(arguments);
var scroller = new qx.ui.container.Scroll();
var container = new qx.ui.container.Composite(new
qx.ui.layout.VBox(10));
container.setPadding(20);
container.setAllowStretchX(false);
scroller.add(container);
this.getRoot().add(scroller, {edge : 0});
var req = new qx.io.remote.Request("http://localhost/test.php", "GET",
"text/plain");
req.addListener("completed", this, function(e) {
var categories = e.getContent();
container.add(this.test("categories"));
// use the following for qooxdoo versions <= 0.6.7:
// alert(e.getData().getContent());
});
req.send();
},
test : function(categories)
{
//alert("in - " + categories);
var tabView = new qx.ui.tabview.TabView();
tabView.setWidth(600);
tabView.setHeight(500);
var page = new qx.ui.tabview.Page("Home");
page.setLayout(new qx.ui.layout.VBox(4));
tabView.add(page);
page.add(new qx.ui.basic.Label(categories));
return tabView;
}
}
});
but it doesn't work. What am I doings wrong?
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/send-the-result-from-an-AJAX-request-to-a-function-tp5308833p5308833.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel