Results 1 to 2 of 2

Thread: Extjs 6 store model definition

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2015
    Posts
    39
    Answers
    1

    Default Extjs 6 store model definition

    Hi,

    is it possible to define the model within the store ?
    PHP Code:
    Ext.create('Ext.data.Store', {    
         
    model: {      
            
    idProperty:'idprop'       
            
    fields: ['name''email''phone']  
         },   
         
    data: [{}]
      .. 
    I tried the following code but it doesn't work
    any help ? thanks

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    I haven't seen it done that way. Personally I would define them separately. If you are just creating a store instance, you can probably omit the model and set the fields config on the store (which creates an anonymous model).

Similar Threads

  1. Replies: 1
    Last Post: 23 Jun 2014, 11:08 AM
  2. Replies: 1
    Last Post: 6 Apr 2014, 8:07 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
  •