Ian,

> What is the correct way of handling this table update?

call "args.response.success()" with the embedded object returned in API 
response.

e.g. API response is: 
{
    "createaccountresponse": {
        "account": {
            "id": "7005b368-5da6-4a8b-a588-e7c5c113c40e",
            "name": "bbb_user",
            "accounttype": 0,
            "domainid": "25a1e8b0-6cce-44cb-b724-8f5543fd85b8",            "
            ~ ~ ~ 
        }
    }
}

pass the embedded object: 
       {
            "id": "7005b368-5da6-4a8b-a588-e7c5c113c40e",
            "name": "bbb_user",
            "accounttype": 0,
            "domainid": "25a1e8b0-6cce-44cb-b724-8f5543fd85b8",            "
            ~ ~ ~ 
       } 
to args.response.success()


like this:
======================================================
success: function(json) {
    var item = json.createaccountresponse.account;
    args.response.success({
          data: item
    });
}
======================================================

Jessica

-----Original Message-----
From: Ian Duffy [mailto:i...@ianduffy.ie] 
Sent: Thursday, July 25, 2013 3:20 AM
To: CloudStack Dev
Subject: Updating list view after data addition.

Hi,

I've modified the "add account" screen to use a custom ui. The custom
UI displays a table of all LDAP users along with the required and
optional input fields.

When I add the user the user doesn't appear on the table of users
until the page is refreshed.

What is the correct way of handling this table update?

is it ok to do:

success: function(args) {
    $('.list-view').listView('refresh');
    close();
 }

Thanks,
Ian

Reply via email to