Results 1 to 4 of 4

Thread: DataView value bug

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3674 in a recent build.
  1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Location
    General Electric, Foxboro, MA
    Posts
    72
    Vote Rating
    6
      0  

    Default DataView value bug

    Not so much a question as a bug report...

    We have found that when using the dataitem object with numeric values, the dataview fails to display the value of integer 0. The issue was traced down the sencha doMapData function, which is supposed to be checking for null or undefined, but is also failing the boolean check because the value of zero will cause the if statement to evaluate to false. For example, we have a setterName of "KPIValue" with the value of 0 (integer). Instead of displaying 0 on the dataview, it leaves the field blank (investigation showed that the (html: 'value') field was completely missing in chrome console.)

    dataitem.js :
    Code:
        doMapData: function(dataMap, data, item) {
    
      -snip-
                       if (data && component[setterName] && data[setterMap[setterName]]) {
                            component[setterName](data[setterMap[setterName]]);
                        }
      -snip-
        }
    regards,
    -Blayne Watt
    Lead Engineer
    General Electric, Inc.

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

    Default

    Moved to the bugs forum and I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member
    Join Date
    May 2012
    Location
    General Electric, Foxboro, MA
    Posts
    72
    Vote Rating
    6
      0  

    Default

    As a note for anyone else encountering the issue, you can work around it by converting all your numeric values into strings, which will not evaluate to boolean false.

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

    Default

    Thanks for the report! This has been fixed for the next release.

Posting Permissions

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