Thanks for Your fast replies, there is obviously something that I don't quit
understand, my code below and it does not work:
qx.Class.define("elaskut.ElaskuService",
{
extend : qx.core.Object,
members :
{
logged : "",
getLogged: function() { return this.logged },
login : function(username, password) {
var req = new qx.io.remote.Request("http://localhost:8080/jlogin/",
"GET", "application/json");
req.setCrossDomain(true);
req.setParameter("login", username);
req.setParameter("passwd", password);
req.addListener("completed", function(e) {
this.logged = e.getContent();
alert("inside: " + e.getContent());
}, this);
req.addListener("failed", function(e) {
alert("failed: " + e.getContent());
});
req.addListener("timeout", function(e) {
alert("timeout: " + e.getContent());
});
req.send();
}
}
});
Thanks for Your help,
Tero
On Fri, Apr 15, 2011 at 11:23 AM, Andrew Manson <[email protected]>wrote:
> Hi Tero,
>
> When you say "class member" do you mean a property or something that is in
> the members:{ } collection?
>
> Cheers,
> - Andrew
>
> -----------------------------------------
> Andrew Manson
> Graticule Cloud
> Applications<http://www.graticule.com/services/cloud-computing>
> www.graticule.com
>
>
>
> On 15 April 2011 08:01, tero.lemmetyinen <[email protected]>wrote:
>
>> Hi,
>>
>> When request is completed how can I put content to a class member?
>>
>> for example, this.data = e.getContent(); seems to work but when I access
>> it form another class data is not set.
>>
>> var req = new qx.io.remote.Request("http://localhost:8080/jlogin/",
>> "GET", "application/json");
>>
>> req.addListener("completed", function(e) {
>> alert("completed: " + e.getContent());
>> this.data = e.getContent();
>> });
>>
>>
>> Thanks
>> Tero
>>
>>
>> ------------------------------------------------------------------------------
>> Benefiting from Server Virtualization: Beyond Initial Workload
>> Consolidation -- Increasing the use of server virtualization is a top
>> priority.Virtualization can reduce costs, simplify management, and improve
>> application availability and disaster protection. Learn more about
>> boosting
>> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel