Results 1 to 2 of 2

Thread: Associate a store to a grid by name, doesn't work

  1. #1

    Default Associate a store to a grid by name, doesn't work

    Until now i've developed with Extjs 4, but the same syntax that i've always used, with the 6th version seems don't work..
    The following is a semplified example

    Defined my store:
    PHP Code:

    Ext
    .define(   
     
    "MyApp.store.Simpsons",    
      {       
           
    extend:"Ext.data.Store",        
           
    model:"MyApp.model.User",   
     }); 
    defined a viewport with a grid

    PHP Code:
    Ext.define('MyApp.view.Viewport', {   
         
    extend"Ext.container.Viewport",    
        
    layout'border',    items: [
         ...

         {       
            
    region'center',       
           
    xtype'tabpanel'// TabPanel itself has no title        
           
    activeTab0,      // First tab active by default        
           
    items:[                    
               {                
                    
    title'Grid',                 
                    
    xtype"grid",       
                    
    columns: [
                           ...
                    ]
                    
    store'Simpsons'//<----------HERE (always used in extjs4)

                
    }               
     ... 
    But when i launch the application, i can't see nothing and into the browser console i see

    TypeError: Cannot read property 'isBufferedStore' of undefined

    due to unrecognized store.


    I make it working writing
    PHP Code:
    store"MyApp.store.Simpsons" 
    or
    PHP Code:
    store:Ext.data.StoreManager.lookup('Simpsons'
    But my doubt is: how is possibile that in extjs 4 i can simple refer to the store by his name, while in ext 6 i need to use entire namespace?
    Is here a way to do the same thing in extjs 6?

  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    908
    Answers
    105

    Default

    Have you tried to assign storeId to your store?

Similar Threads

  1. PageSize doesn't work in grid when I use WMSCapabilitiesStore as store
    By Gary Schlosberg in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 19 Jul 2016, 8:21 AM
  2. PageSize doesn't work in grid when I use WMSCapabilitiesStore as store
    By ber bor in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 15 Jul 2016, 9:51 AM
  3. Replies: 3
    Last Post: 5 Apr 2015, 1:31 PM
  4. Replies: 3
    Last Post: 21 Jan 2015, 7:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •