shinobukawano / Ext.ux.AccordionList

Accordion List Component for Sencha Touch 2
http://kawanoshinobu.com/public/demo/accordionlist/
50 stars 28 forks source link

Sencha Architect 3 - Ext.ux.AccordionList #29

Closed biletooth closed 9 years ago

biletooth commented 10 years ago

Can you explain how the store fields works in Sencha Architect 3? I can programmatically assign the store to the accordion component accordion.setStore(x); but i cannot seem to get the accordion to work with the store field. It seems that Sencha Architect 3 wraps the field in a ' '.

store: 'Ext.create(\'App.data.TreeStore\')'

shailendramonu commented 9 years ago

Same problem here. any update on this? How do I make this thing work on architect?

shinobukawano commented 9 years ago

Hi there!

Could you confirm the description of "Integrate into Sencha Architect" at README.md?

You need to set store instance at initialize event handler because Architect does not support to use TreeStore at user extensions config.

shailendramonu commented 9 years ago

Tried:

var store = Ext.create('MyApp.store.Task'); store.load();


var store = Ext.create('Ext.data.TreeStore', { model: 'MyApp.model.Task', defaultRootProperty: 'items', storeId: 'Task', }); store.load();


But nothing works....

shinobukawano commented 9 years ago

Fmm..

I confirmed sample project "Ext.ux.AccordlingList/architect/accordionListSample.xda" with latest version of Architect. That works well.

Have you confirmed it? I have no idea about your problem..

shailendramonu commented 9 years ago

Sencha Architect version: 3.0.4.1386 channel: 3.0.1-stable platform: 1.3.0.803 cmd: 4.0.4.84 framework: Sencha Touch 2.3.x

I can see ajax request for json but cant see updating store.

screen shot 2015-09-14 at 3 34 15 pm screen shot 2015-09-14 at 3 34 29 pm screen shot 2015-09-14 at 3 34 54 pm screen shot 2015-09-14 at 3 35 05 pm screen shot 2015-09-14 at 3 35 12 pm screen shot 2015-09-14 at 3 35 20 pm
shinobukawano commented 9 years ago

It seems that you don't set the store instance to the accordion list component. Let's try followings.

{
    xytpe: 'accordionlist',
    ...
    listeners: {
      fn: function (component, eOpts) {
          var store = Ext.create('MyApp.store.Task', {
              ...
          });
          store.load();
         // Sets store to the component
          component.setStore(store);
      },
      event: 'initialize'
   }
}
shailendramonu commented 9 years ago

Little change and store works. But in architect accordianlist needs to provide specific height, Its not working when not provide any height.

{
    xytpe: 'accordionlist',
    ...
    listeners: {
      fn: function (component, eOpts) {
          var store = Ext.create('MyApp.store.Task', {
              ...
          });

         // Sets store to the component
          component.setStore(store);
          store.load();
      },
      event: 'initialize'
   }
}
shinobukawano commented 9 years ago

Have you tried to set 'layout:fit' at parent container? It would be required.