1. #1
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default Answered: ST2 RC & Beta List and rendering issues

    Answered: ST2 RC & Beta List and rendering issues


    The following code snippets resides in the ST2 (RC & Beta) documentation.

    The problem is as follows:
    1. When using ST's RC version, the list doesn't work...and the interface renders fine.
    2. When using ST's Beta version, the list renders fine...but the interface breaks (tabBar goes to the top and becomes totally useless).
    My code is as follows...

    Code:
    var list = Ext.create('Ext.DataView', {
    
    
        fullscreen: true,
        iconCls: 'favorites',
        cls: 'twitterView',
        store: {
            autoLoad: true,
            fields: ['from_user', 'text', 'profile_image_url'],
    
    
            proxy: {
                type: 'jsonp',
                url: 'http://search.twitter.com/search.json?q=Sencha Touch',
    
    
                reader: {
                    type: 'json',
                    root: 'results'
                }
            }
        },
    
    
        itemTpl: '<img src="{profile_image_url}" /><h2>{from_user}...</h2><p>{text}</p><div style="clear: both"></div>'
    
    
    });
    
    
    
    
    Ext.application({
        name: 'MyApp',
    
    
        launch: function() {
    
    
            Ext.create('Ext.TabPanel', {
                fullscreen: true,
                tabBarPosition: 'bottom',
    
    
                defaults: {
                    styleHtmlContent: true
                },
    
    
                items: [ list,
                    {
                        title: 'Home',
                        iconCls: 'home',
                        html: 'Home Screen'
                    },
                    {
                        title: 'Contact',
                        iconCls: 'user',
                        html: 'Contact Screen'
                    }
                ]
            });
        }
    });
    And the index.html ...

    Code:
    !DOCTYPE html>
    <html>
    <head>
    
    
        <!-- RC -->
        <!--
        <link rel="stylesheet" href="../sencha-2.rc/resources/css/sencha-touch.css" type="text/css">
        <script type="text/javascript" src="../sencha-2.rc/builds/sencha-touch-all-debug.js"></script>
        -->
    
    
        <!-- BETA -->
    
    
    
    
        <link rel="stylesheet" href="../sencha-2.0/resources/css/sencha-touch.css" type="text/css">
        <script type="text/javascript" src="../sencha-2.0/sencha-touch-all-debug.js"></script>
    
    
    
    
        <script type="text/javascript" src="listr.js"></script>
        <title>Next24</title>
    </head>
    <body></body>
    </html>
    Am I doing anything wrong here? Or is this a bug (known issue maybe?)

    Please advise ...

    Regards,
    Riyaad

  2. Hi Mitchell,

    Thank you, I got it working. Strangest thing, it actually worked with root: 'results' as well as rootProperty: 'results. I did a clean install of both the SDK and ST2 on this machine (Win7) and believe the possible problem may be an incorrect version of the SDK against ST on my Mac hence not only this issue but some other inconsistent results. Guess you learn something new everyday ...

    Will be testing this theory in the next few hours

    Regards,
    Riyaad

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It displays fine for me in beta3 and RC1/2. The only thing I do see is the root config in your reader config has been renamed to rootProperty.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default


    Hi Mitchell Simoens

    I'm following the code on http://docs.sencha.com/touch/2-0/#!/api/Ext.dataview.DataView

    The reader here clearly states ...

    Code:
    reader: {
                    type: 'json',
                    root: 'results'
                }
    Are you saying that

    Code:
    reader: {
                    type: 'json',
                    rootProperty: 'results' // changes made here
                }
    should work for both Beta3 and RC1/2?

    Regards
    Riyaad

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What I said is that your code worked for me in beta3 and RC1/2 but the root config is renamed to rootProperty.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default Okay ...I got it.

    Okay ...I got it.


    Hi Mitchell,

    Thank you, I got it working. Strangest thing, it actually worked with root: 'results' as well as rootProperty: 'results. I did a clean install of both the SDK and ST2 on this machine (Win7) and believe the possible problem may be an incorrect version of the SDK against ST on my Mac hence not only this issue but some other inconsistent results. Guess you learn something new everyday ...

    Will be testing this theory in the next few hours

    Regards,
    Riyaad

  7. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I didn't think the root->rootProperty change would affect anything as it worked for me both ways. I would be interested in hearing if you figure out if there was an issue somewhere.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  8. #7
    Sencha User riyaad's Avatar
    Join Date
    Jul 2011
    Location
    Cape Town
    Posts
    240
    Answers
    6
    Vote Rating
    1
    riyaad is on a distinguished road

      0  

    Default Sorted ...

    Sorted ...


    I reinstalled with the newer SDK & ST libraries (both on Mac & Win7)
    This seem to have resolved the issue ... the list works now

Thread Participants: 1

Tags for this Thread

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