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
    69
    Vote Rating
    5
    blaynewatt is on a distinguished road

      0  

    Default DataView value bug

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Vote Rating
    849
    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


    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
    69
    Vote Rating
    5
    blaynewatt is on a distinguished road

      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
    10
    TommyMaintz will become famous soon enough TommyMaintz will become famous soon enough

      0  

    Default


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

Thread Participants: 2