1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Answers
    6
    Vote Rating
    2
    landed is on a distinguished road

      0  

    Question Unanswered: Uncaught TypeError: Object [object Object] has no method 'getItemId'

    Unanswered: Uncaught TypeError: Object [object Object] has no method 'getItemId'


    I get this error when trying to add an item to a main view class.
    here is some code in the main index file (for some reason the developer is loading in the classes manual here istead of dynamic- dont really want to change that at this stage)
    Code:
        <script type="text/javascript" src="src/view/markets/Olist.js"></script>
        <script type="text/javascript" src="src/view/Market.js"></script>
    src/../Olist.js (I have cut this down to get rid of errors but i want a custom html item here which will be a row of a list)
    Code:
    Ext.define('Ap.view.markets.Olist', {   extend: 'Ext.data.Model',
       xtype:'olist',
       fields: ['firstName', 'lastName'],
       config: {
            id: 'CustomList'
        }
    });
    and here is the class calling that with the item way of doing it
    Code:
    Ext.define('Ap.view.Market', {  extend: "Ext.Panel",
      xtype: 'marketPanel',
      requires:['Ap.view.markets.Olist'],
      
      config: {
        title: _s('market'),
        iconCls: 'market',
        items: [
          {
            xtype: 'titlebar',
            docked: 'top',
            title: _s('market'),
          },
          
          {//vbox to stack the tables and labels
              layout:'vbox',
              centered:'true',
              items:[
              
                  {
                xtype: 'segmentedbutton',
                allowMultiple: false,
                items: [
                    { 
                        text: 'aaa'
                    },
                    { 
                        text: 'bbb',
                        pressed: true
                    }
                ]
              }
              
              ,
                {
                    xtype: 'label',
                    html: 'Lisbon',
                    height: 69
                }
                
                ,
                {
                    xtype:'olist'
                }
                ]
              
            }
    
    
        ]
      }
    });
    I appreciate any help on this as it is a bit ambiguous. THANKS

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Answers
    6
    Vote Rating
    2
    landed is on a distinguished road

      0  

    Default Is this a bug ?

    Is this a bug ?


    making extend: 'Ext.data.Model' a panel instead works...but I need to extend model.
    Any help appreciated.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    49
    Answers
    6
    Vote Rating
    0
    j.k is on a distinguished road

      0  

    Default


    Either your class is a Model (then it shouldn't be in your view package and you cannot add it to your UI) or it is a Panel or other component (then you can't extend from Model and use its methods). Those are two different concepts and you can't have both in one, that wouldn't make much sense.
    What are you trying to accomplish?

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    255
    Answers
    6
    Vote Rating
    2
    landed is on a distinguished road

      0  

    Arrow


    I'm trying to get a simple hard coded list working then progress to use a data model via a proxy (xml feed).
    So the list Olist.js is my custom class that is to get populated.
    But having even a baisc panel doesn't seem to work.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar