response.getData - READ DATA FROM RESPONDE

    Record[] records = response.getData();
    if(records != null && records.length > 0)
    {
        // I have verified that by this point in the code records.length is 1
        if(records[0].getAttribute("key") != null)
        {
            if(records[0].getAttribute("value") != null)
            {
                SC.say(records[0].getAttribute("key") + " is " + records[0].getAttribute("value");
            }
            else 
            {
                SC.say("value was null");
            }
        }
        else
        {
            SC.say("Invalid response.  Did not contain key");
        }
    }
    else
    {
        SC.say("records was null or empty");
    }

Comments

Popular posts from this blog

how to access the DOM gwt smartclient

smart gwt allow only numbers in textfield