Results 1 to 3 of 3

Thread: JSON data not displayed correctly due to issues with identifier containing $

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-2859 in a recent build.
  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default JSON data not displayed correctly due to issues with identifier containing $

    REQUIRED INFORMATION


    Ext version tested:

    • Sencha Touch 2.0.1



    Browser versions tested against:

    • Chrome 18.0.1025.162 m(Windows)



    DOCTYPE tested against:

    • Sample Data:
      Ext.data.JsonP.callback1({"title":{"type":"someData","$t":"someData"}});



    Description:

    • When receiving JSON objects with identifiers $t, it cannot validate these records and thus no data is shown.



    Steps to reproduce the problem:

    • make an call and fetch JSON data with identifiers that contain or begin with $



    The result that was expected:

    • Show a list of titles that come from an url



    The result that occurs instead:

    • Visual : page keeps loading the results, no data is eventually shown.



    Test Case:

    Code:
        Ext.define('SenchaTest.view.Blog',{
        extend: 'Ext.navigation.View',
        xtype: 'blog',
        
        requires: [
        'Ext.dataview.List',
        'Ext.data.proxy.JsonP',
        'Ext.data.Store'
        ],
        
        
        config:{
            title: 'Blog',
            iconCls: 'star',
            
            items:{
                               xtype: 'list',
                               itemTpl: '{title.$t}',
                                title:'Recent Posts',
                                store: {
                                    autoLoad: true,
                                    fields: ['title'],
    
                                proxy: {
                                        type: 'jsonp',
                                        url: 'httpCall',
                                        reader: {
                                            type: 'json',
                                            rootProperty: 'rootProp'
                                        }
                                    }
                                }
                            }
                        
                    
        }
    });


    HELPFUL INFORMATION

    Debugging already done:

    • I have already debugged the code and got it partially working when changing this entry "tagRe: /([\w-\.\#]+)(?:\[\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/" to "tagRe: /([\w-\.\#\$]+)(?:\[\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/" in XTemplateCompiler.js


    Operating System:

    • Windows 7

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,422
    Vote Rating
    1271
      0  

    Default

    Thanks for the report.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243
    Vote Rating
    11
      0  

    Default

    This has been resolved for the next release. Thanks for the report and debugging done.

Tags for this Thread

Posting Permissions

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