Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    11
    Vote Rating
    0
    maxLodoss is on a distinguished road

      0  

    Default Ext.dataview.List doesn't show text in lines if stores storeId setup.

    Ext.dataview.List doesn't show text in lines if stores storeId setup.


    I have list
    PHP Code:
    id'myid',                
    xtype'list',               
    flex1,                
    scrollable 'vertical',               
    store'MyStore',               
    itemTpl'<div>{firstName} {lastName}</div>',               
    cls'messagelist',                
    emptyText'<div class="emptymsg">some text</div>' 
    also I have Store
    PHP Code:
    Ext.define('MyApp.store.MyStore', {        
    extend  'Ext.data.Store',requires: ['MyApp.model.Contact'],
    config  :{        storeId 'myStore'
    model'MyApp.model.MyModel',           
    sorters'lastName',           
    data: [               
    {
    firstName'Tommy',   lastName'Maintz'},  
    {
    firstName'Rob',     lastName'Dougan'},             
    {
    firstName'Ed',      lastName'Spencer'}          
     ]   
     }}); 
    and Model:
    PHP Code:
    Ext.define(''MyApp.model.MyModel', {   extend: 'Ext.data.Model',   fields: ['firstName', 'lastName']}); 
    If MyStore have storeId then I see empty list without lines, if comented "storeId : 'myStore'," then I see 3 lines , but without text.

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    7
    TommyMaintz will become famous soon enough

      0  

    Default


    I can't reproduce this error. If I run the following code it works as expected. Is there anything you see you might be doing differently that causes this problem?

    Code:
    Ext.define('MyApp.model.MyModel', {
        extend: 'Ext.data.Model',
        fields: ['firstName', 'lastName']
    });
    
    Ext.define('MyApp.store.MyStore', {
        extend  : 'Ext.data.Store',
        config  : {
            storeId: 'myStore',
            model: 'MyApp.model.MyModel',
            sorters: 'lastName',
            data: [
                {firstName: 'Tommy',   lastName: 'Maintz'},
                {firstName: 'Rob',     lastName: 'Dougan'},
                {firstName: 'Ed',      lastName: 'Spencer'}
            ]
        }
    });
    
    Ext.setup({
        onReady : function() {
            // Note that you can only create one of these store's as you have specified
            // a storeId in the class definition. Better would be to remove it from the
            // definition and set the storeId when you create an instance of your store
            // var store = Ext.create('MyApp.store.MyStore', {
            //     storeId: 'myStore'
            // });
    
            var store = Ext.create('MyApp.store.MyStore');
    
            var list = Ext.create('Ext.List', {
                id: 'myid',
                xtype: 'list',
                fullscreen: true,
                store: 'MyStore',
                itemTpl: '<div>{firstName} {lastName}</div>',
                cls: 'messagelist',
                emptyText: '<div class="emptymsg">some text</div>'
            });
        }
    });
    Also note that when you are using our MVC package, if you include the store in your application using the stores: [] configuration on Application, it will automatically create an instance of your store for you. If you hadn't specified a storeId in your configuration, it will automatically use the Store class name - the namespace as the storeId. In your case it would be 'MyStore'.

    Hope this solves your issue.

Thread Participants: 2

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