1. #1
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    158
    Vote Rating
    0
    locutusUT is on a distinguished road

      0  

    Question How to covert a working ExtJS datastore to Sencha Touch model?

    How to covert a working ExtJS datastore to Sencha Touch model?


    Hello,

    I have a working ExtJS example that I am trying to port to SenchaTouch using the model approach described here. For my use case, it's basically a scripttagproxy that pull's back json data that I would like to have stored. When I try using this code I get "Uncaught TypeError: Object #<an Object> has no method 'setModel'".

    Any ideas?

    TIA!

    Code:
            Ext.regModel('Die', {
                fields: [
                     {name: 'dieId'},
                     {name: 'dieName'},
                     {name: 'dieType'},
                     {name: 'dieFoundry'},
                     {name: 'dieRev'}
                ]
            });
            var list = new Ext.List ( {
            	title: 'My Dies',
            	store: new Ext.data.Store ({
            		autoLoad: true,
            		model: 'Die',
            		proxy: {
            			type: 'scripttag',
            			url: 'http://myserver.com/solr-oasis/select?',
            			callbackParam: 'json.wrf',
            			extraParams: {
            				q: 'fred',
            				version:'2.2',
            				indent:'on',
            				start:0,
            				rows:10,
            				qt:'dismax_hw',
            				wt:'json',
            				'json.nl':'arrarr'
            			},
            			reader: {
            				type: 'json',
            				root: 'response.docs',
            				totalProperty: 'response.numFound'
            			}
            		}	
            	}),
    			tpl: ['<tpl for=".">', '<div>',
    			      '<h2>{dieId}</h2>', 
    			      '<p>{dieName}</p><strong></strong>','<p>{dieFoundry}</p>', 
    			      '</div>', '</tpl>'].join(''),
    	        emptyText: '<p style="padding: 10px">No dies found matching that search</p>'
            });

  2. #2
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    158
    Vote Rating
    0
    locutusUT is on a distinguished road

      0  

    Default


    Just saw there is a new release for Sencha Touch (0.92). Using that version allowed this to work as expected.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,828
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    There's been a few changes to the data package to fix up some bugs in 0.92.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Location
    Indore India
    Posts
    14
    Vote Rating
    0
    gauravbdubey is on a distinguished road

      0  

    Default


    Thanks for the Example

Similar Threads

  1. Sencha Touch with Rhodes
    By sumisha in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 29 Apr 2012, 11:47 PM
  2. Debugging Sencha Touch
    By profunctional in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 31 Jan 2012, 1:20 AM
  3. IDE for Sencha Touch
    By dannixon in forum Sencha Touch 1.x: Discussion
    Replies: 11
    Last Post: 22 Dec 2011, 10:47 PM
  4. Sencha Touch on iPhone v1 / iPod touch v1 ?
    By palnap in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 28 Oct 2010, 5:30 PM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi