1. #1
    Sencha User
    Join Date
    Dec 2010
    Location
    HKSAR
    Posts
    17
    Vote Rating
    0
    agentyikes is on a distinguished road

      0  

    Default store xtype

    store xtype


    Is this correct?
    Code:
    var store = {
       xtype: 'store',
       autoLoad: true
       proxy: ......
    }

  2. #2
    Sencha User Riaz's Avatar
    Join Date
    Sep 2010
    Location
    Sydney, Australia
    Posts
    183
    Vote Rating
    1
    Riaz is on a distinguished road

      0  

    Default


    Logically, it looks ok to me but I did not test yet.

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Location
    HKSAR
    Posts
    17
    Vote Rating
    0
    agentyikes is on a distinguished road

      0  

    Default


    I tried it but it said xtype:'store' not defined!

  4. #4
    Sencha Premium Member crysfel's Avatar
    Join Date
    Feb 2008
    Location
    New York, USA
    Posts
    218
    Vote Rating
    8
    crysfel will become famous soon enough

      0  

    Default


    I'm not sure, but I think you can't create a store with a xtype there's no xtype in the documentation, also I looked at the code and I didn't find the line where the Store class define their xtype.

    Best regards

  5. #5
    Sencha User
    Join Date
    Feb 2011
    Posts
    27
    Vote Rating
    0
    ngardner is on a distinguished road

      0  

    Default


    Quote Originally Posted by crysfel View Post
    I'm not sure, but I think you can't create a store with a xtype there's no xtype in the documentation, also I looked at the code and I didn't find the line where the Store class define their xtype.

    Best regards

    Correct, there is no store xtype. What your prob looking for is...
    Code:
    var myStore = new Ext.data.Store({
        autoLoad: true,
        proxy: ......
    });

  6. #6
    Sencha User Riaz's Avatar
    Join Date
    Sep 2010
    Location
    Sydney, Australia
    Posts
    183
    Vote Rating
    1
    Riaz is on a distinguished road

      0  

    Default


    In the API, I have got following information -

    xtype Class
    ------------- ------------------
    button Ext.Button
    component Ext.Component
    container Ext.Container
    dataview Ext.DataView
    panel Ext.Panel
    slider Ext.form.Slider
    toolbar Ext.Toolbar
    spacer Ext.Spacer
    tabpanel Ext.TabPanel

    Form components
    ---------------------------------------
    formpanel Ext.form.FormPanel
    checkboxfield Ext.form.Checkbox
    selectfield Ext.form.Select
    field Ext.form.Field
    fieldset Ext.form.FieldSet
    hiddenfield Ext.form.Hidden
    numberfield Ext.form.Number
    radiofield Ext.form.Radio
    textareafield Ext.form.TextArea
    textfield Ext.form.Text
    togglefield Ext.form.Toggle


    However, according to the theory, it is mentioned that -
    Two ways we can generate a component.
    a. Instantiating an Object
    b. Passing a child to a container as JSON with an xtype.



    Example of Object:

    Var myButton = new Ext.Button({
    Text:’Activate’
    });

    Var myPanel = new Ext.Panel({
    items:[myButton, …]
    });

    myButton.on(‘press’,…);


    Example of xtype:
    Var myPanel = new Ext.Panel({
    items:[{
    xtype:’button’,
    id:’myButton’,
    text:’Activate’
    }, …]
    });

    Ext.getCmp(‘myButton’).on(‘press’, …);
    is "Store" component?

  7. #7
    Ext JS Premium Member Juanito's Avatar
    Join Date
    Apr 2007
    Location
    San Diego->Boston->Brazil
    Posts
    161
    Vote Rating
    4
    Juanito is on a distinguished road

      0  

    Default


    I think you just use type intead of xtype, like layout configs

    PHP Code:
     {
      
    type'array',
      
    fields: [...],
      
    data: []

    https://fiddle.sencha.com/#fiddle/fb

Similar Threads

  1. Using xtype for grid/store/paging toolbar breaks data binding [SOLVED]
    By Screamy in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 25 Sep 2010, 11:16 AM
  2. store as xtype
    By archmisha in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 14 Aug 2009, 6:51 AM
  3. [Resolved] Ext 3.0. this.store not work in bbar and my xtype
    By Rafael in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 16 Apr 2009, 2:40 PM
  4. referring to grid store in xtype
    By SunWuKung in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 21 Jan 2009, 5:16 AM

Thread Participants: 4