Results 1 to 8 of 8

Thread: Total Sencha Touch Newbie? Panel not rendering ...

  1. #1
    Sencha User davisty's Avatar
    Join Date
    Mar 2010
    Location
    Spanish Fort, Al
    Posts
    283
    Answers
    11

    Default Answered: Total Sencha Touch Newbie? Panel not rendering ...

    Hello,

    Im new to touch and 4.0. Im doing a crash course by necessity.

    I have a list that Im trying to render in chrome, but it's not rendering. Im using the example out Kichen Sink for a list.

    My list will not render, Im getting no rendering, and firebug isnt reporting any erros. I know Firefox wont work, Im just using firefox for syntax errors. And the jsonstore is being loaded. Does anyone see anything?

    PHP Code:
    Ext.regModel('VESVOY', {
             
    fields: ['SCVESL''SCVOYN']
    });     
    // create the data store     
    var ListStore = new Ext.data.JsonStore({
         
    model'VESVOY',
         
    proxy: {
                 
    type'ajax',
                 
    url'EXTJSVV.PGM',
                
    reader: {
                    
    type:'json',
                    
    root:'MDVESB'
                
    }
        },
         
    sorters'SCVESL',
         
    getGroupString : function(record) {
                 return 
    record.get('SCVESL')[0];
             },
         
    autoLoadtrue,
         
    root'MDVESB',
         
    fields: [
                  
    'SCVESL',
                  
    'SCVOYN',
       ]
    });  

    List = new 
    Ext.Panel ({
         
    items: [{
            
    title'Grouped',
            
    layoutExt.is.Phone 'fit' : {
                
    type'vbox',
                
    align'center',
                
    pack'center'
            
    },
            
    cls'demo-list',
            
    items: [{
                
    widthExt.is.Phone undefined 300,
                
    height500,
                
    xtype'list',
                
    storeListStore,
                
    itemTpl'<div class="contact"><strong>{SCVESL}</strong>{SCVOYG}</div>',                    
                
    groupedtrue,
                
    indexBartrue
           
    }]    
        }]        
    }); 

  2. BTW, be careful when copy/pasting your code into the CODE tags... your line breaks are not being respected and it's painful to look through.

    The Ext.onReady() may help... it's good practice to use anyways. Give it a shot and let me know.

  3. #2
    Sencha Developer
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516
    Answers
    99

    Default

    You don't tell your panel ("List") to render anywhere!

    You could use the "renderTo" config, or you could set the "fullscreen" config to true.

  4. #3
    Sencha User davisty's Avatar
    Join Date
    Mar 2010
    Location
    Spanish Fort, Al
    Posts
    283
    Answers
    11

    Default

    I saw that after I posted and added it. But Im getting the same results.

    Im not getting any js errors and the liststore is loading ...

    Im not sure but do I need the doc ready ?


    Code:
    <!doctype html> <html> <head> <title>Sencha Touch  Example</title>      <link rel="stylesheet" type="text/css" href="/JS/sencha-touch.css" />     <script type="text/javascript" src="/JS/sencha-touch-debug.js"></script>     <script type="text/javascript">      Ext.regModel('VESVOY', {         fields: ['SCVESL', 'SCVOYN']     });      // create the data store     var ListStore = new Ext.data.JsonStore({     model: 'VESVOY',     proxy: {             type: 'ajax',     url: 'EXTJSVV.PGM',     reader: {     type:'json',     root:'MDVESB'        }     },     sorters: 'SCVESL',     getGroupString : function(record) {             return record.get('SCVESL')[0];         },     autoLoad: true             });  List = new Ext.TabPanel ({ fullscreen: true,         showAnimation: {             type: 'pop',             duration: 250         },         renderTo: 'panel',     items: [{     title: 'Grouped',             layout: Ext.is.Phone ? 'fit' : {                 type: 'vbox',                 align: 'center',                 pack: 'center'             },             cls: 'demo-list',             items: [{                 width: Ext.is.Phone ? undefined : 300,                 height: 500,                 xtype: 'list',                 store: ListStore,                 itemTpl: '<div class="contact"><strong>{SCVESL}</strong>{SCVOYG}</div>',                 grouped: true,                 indexBar: true    }]  }]        }); </script>         </head>         <body> 
            <div id="panel"></div>         </body> </html>

  5. #4
    Sencha Developer
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516
    Answers
    99

    Default

    BTW, be careful when copy/pasting your code into the CODE tags... your line breaks are not being respected and it's painful to look through.

    The Ext.onReady() may help... it's good practice to use anyways. Give it a shot and let me know.

  6. #5
    Sencha User davisty's Avatar
    Join Date
    Mar 2010
    Location
    Spanish Fort, Al
    Posts
    283
    Answers
    11

    Default

    That did it !!!

    I wasnt sure about it in touch or sencha ...

    Im buying you a beer tonight ...

    Oh, BTW how do I post it with the line break?

  7. #6
    Sencha Developer
    Join Date
    Sep 2008
    Location
    Antioch, IL
    Posts
    1,516
    Answers
    99

    Default

    When you copy/paste your code, you may have to manually re-enter the line breaks. Just look at your post after you submit it, and if the line breaks are messed up just hit "edit post" and reenter the line breaks.

    Glad you got it working!

  8. #7
    Sencha User
    Join Date
    Aug 2010
    Posts
    315
    Answers
    4

    Default

    Was just answered, sorry....

  9. #8
    Sencha User davisty's Avatar
    Join Date
    Mar 2010
    Location
    Spanish Fort, Al
    Posts
    283
    Answers
    11

    Default

    What is Ext.Setup?

    Im making my first dive into touch and 4.0. Ive got some experience with the 3.x family but thats about it.

    Im having problems finding meaningful 4.0/touch examples. Im taking the existing examples and ...trying... to extrapolate them into our environment. We use the System i(AS/400) so I not too knowledgeable with PHP(although it runs on "i"). We use RPG to make the ajax response.

    Not a criticism, but there needs to be more business related type examples(doing DB fetches and stuff), in addition to the facebook/social-media stuff.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •