0
votes

I have a simple List inside a container that I would like to see refreshed with new items when it is activated.

In my controller, I have an event for this:

onActivate: function() {
    var that = this;
    var store = this.getApprovalRequestsStore();
    store.getProxy().setUrl('http://mobile-approvals-services.example.com/'+ Global.approvalsListUri + Approvals.app.user);
    store.load({
        callback: function (records, model) {
            debugger;
            that.getApprovalsList().refresh();
        }
    });
},

And in my list, I have a tpl for the items that come back from the store (verified I have items coming back from store at break point above), yet no items are shown:

Ext.define('Approvals.view.approvals.List', {
    extend: 'Ext.List',
    xtype: 'approvalsList',
    config: {
        itemId: 'ApprovalsList',
        store: 'ApprovalRequests',
        itemHeight: 70,
        variableHeights: false,
        pressedDelay: 0,
        emptyText: "<div>No Approvals Found</div>",
        loadingText: "Loading...",
        onItemDisclosure: false,
        itemTpl: '<div class="listView">Request For: {requestedFor}</div>',...

Is there something flawed in my approach?

1

1 Answers

0
votes

It was a problem with the reader. Once I set totalProperty and successProperty to values being returned from the service it worked. WTHO.