Search code examples
sencha-touch-2sencha-architect

unable to edit data on container coming fron a store in Sencha Touch Architect


I'm using Sencha Architect 2.1

I have an Store and a Container, but how can I render the data from the store using the container?

I created a 1 minute video explaining the problem:

http://www.youtube.com/watch?v=_HpR9h80D94

In other words this is what I want to do in Secha Designer 2:

data: ordersStoreId.getData(),

Compleate:

            xtype: 'container',
            title: 'MyContainer6',
            iconCls: 'info',
            data: ordersStoreId.getData(),
            tpl: [
                'Testing: {status}'
            ]

Any idea? Thanks! :)


Solution

  • So this looks like a bug. I guess one way to work around this issue is to add the show listener to your container and then you can dynamically pull in data from your store.

    listeners: {
        show: function(this, opts){
            this.setData( Ext.getStore('yourStore').getData() );
        }
    }
    

    So in Architect:

    1) Select your container

    2) In your config window add an Event Bindings by clicking the + icon and choose Basic Event Binding

    3) Choose the event name show like I suggested. You will then be presented with an editable code view where you can put your code. ex:

    this.setData( Ext.getStore('yourStore').getData() );
    

    Hope this helps.