1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Answers
    16
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default Unanswered: List in NestedList: Bug Sencha?

    Unanswered: List in NestedList: Bug Sencha?


    Hey,

    For several days, i search to implement a list in a nestedlist, with Json file but it doesn't work.
    In fact, i have my nestedList, and when i call the "getDetailCard" function, i call a list in the panel.

    When i call the list like the API Documentation, it works (with data in store). But when i call a Json file by proxy in Store; it doesn't work. there is an infinite loading panel. But i checked, the Json is in good URL ...

    I don't understand i did many list by this way, and they work fine.
    It can be a bug?

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    43
    Answers
    4
    Vote Rating
    0
    bassjobsen is on a distinguished road

      0  

    Default


    Hi,

    Have you tried a local json file?
    see also: http://en.wikipedia.org/wiki/Same_origin_policy

    Best regards,

    Bass

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Answers
    16
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    hum yes,
    my file is a local file, in a data folder, and i load this one by url: 'http://localhost:8888/app/data/file.json' .. Then i don't understand.

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    43
    Answers
    4
    Vote Rating
    0
    bassjobsen is on a distinguished road

      0  

    Default


    btw for local files you can use:

    proxy: {
    type : 'ajax',
    url : 'data/file.json',
    reader : {
    type : 'json'
    },

    Can you give us a sample of your store code and json data?

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Answers
    16
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    Yep i tried that: url : 'data/file.json' But nothing better.

    This is my Code:
    The Main function with the nestedList:
    Code:
    	getDetailCard: function(item, parent) {
    			var itemData = item.attributes.record.data;
    			parentData = parent.attributes.record.data;
    			detailCard = new Ext.Panel ({
    				items: [WPApp.views.DirectoryItemListList]
    			});
    			detailCard.update(itemData);
    			this.backButton.setText(parentData.text);
    			return detailCard;
    		},
    Code of list:
    Code:
    Ext.regModel('WPApp.models.DirectoryItemListListModel', {
        fields: ['firstName', 'lastName']
    });
    
    
    WPApp.stores.DirectoryItemListListStore = new Ext.data.Store({
        model  : 'WPApp.models.DirectoryItemListListModel',
    	proxy: {
    		type: 'ajax',
    		url: 'http://localhost:8888/WPApp/data/name.json',
    		reader: {
    			type: 'json',
    		}
    	},
    	autoLoad: true
    });
    
    
    
    
    WPApp.views.DirectoryItemListList = new Ext.List({
    	fullscreen: true,
    	itemTpl : '{firstName} {lastName}',
    	store: WPApp.stores.DirectoryItemListListStore
    });
    And the Json File
    Code:
    [
        {firstName: 'Tommy',   lastName: 'Maintz'},
        {firstName: 'Rob',     lastName: 'Dougan'},
        {firstName: 'Ed',      lastName: 'Spencer'},
        {firstName: 'Jamie',   lastName: 'Avins'},
        {firstName: 'Aaron',   lastName: 'Conran'},
        {firstName: 'Dave',    lastName: 'Kaneda'},
        {firstName: 'Michael', lastName: 'Mullany'},
        {firstName: 'Abraham', lastName: 'Elias'},
        {firstName: 'Jay',     lastName: 'Robinson'}
    ]
    Like the API DOC.... I don't understand

  6. #6
    Sencha User
    Join Date
    Sep 2011
    Posts
    19
    Vote Rating
    0
    johnseelewis is on a distinguished road

      0  

    Default Error in JSON

    Error in JSON


    I believe you need to place your attributes firstName and lastName in quotes: "firstName" and "lastName". BTW, at first, I didn't notice the error in your JSON, so I ran it through an online checker at http://json.parser.online.fr I always do that to be sure my JSON is formatted correctly.

  7. #7
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Answers
    16
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    OMG, yes thanks, i add "" like that, and i can display the list one time:
    Code:
    [
    	{"firstName": "Tommy", "lastName": "Maintz"},
    	{"firstName": "Rob", "lastName": "Dougan"},
    	{"firstName": "Ed", "lastName": "Spencer"},
    	{"firstName": "Jamie", "lastName": "Avins"},
    	{"firstName": "Aaron", "lastName": "Conran"},
    	{"firstName": "Dave", "lastName": "Kaneda"},
    	{"firstName": "Michael", "lastName": "Mullany"},
    	{"firstName": "Abraham", "lastName": "Elias"},
    	{"firstName": "Jay", "lastName": "Robinson"}
    ]
    But i have another problem.

    When i have my nestedList detailCard, i can display my liste now.
    But when i come back with the button, i can't click another time on an item ...
    Just work one time and after i can't access to ma list.

    Have you an idea?

  8. #8
    Sencha User
    Join Date
    Sep 2011
    Posts
    19
    Vote Rating
    0
    johnseelewis is on a distinguished road

      0  

    Default


    Not sure. I am new to this myself. I would check out the MVC example in this tutorial: http://www.sencha.com/learn/working-with-forms/

    I was able to get the actual code from GitHub and I have been using it as a starting point https://github.com/senchalearn/Forms-demo

    H
    ope this answers your question somehow.

  9. #9
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Answers
    16
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    hum yes i'm reading that, but i don't know if something help me.
    I just have a bug with my calling view i think,
    but i don't know how to answer ...

  10. #10
    Sencha User
    Join Date
    Sep 2011
    Posts
    19
    Vote Rating
    0
    johnseelewis is on a distinguished road

      0  

    Default


    I might post a new question for that.

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