代码之家  ›  专栏  ›  技术社区  ›  Scott

ext.js存储记录未定义

  •  0
  • Scott  · 技术社区  · 15 年前
    var debtProtectionId = 0
        // get the selected id of debt protection dropdown
        if (mainPanel.generalPanel.calculationsFieldSet.debtProtection.getValue() != '') {
            debtProtectionId = mainPanel.generalPanel.calculationsFieldSet.debtProtection.getValue();
        }
        // get the store record with this id
        var storeRecord = planCombinationsStore.getAt(debtProtectionId)
    

    当我运行代码时,它说“storerecord is undefined”。

    这可能是什么原因?

    1 回复  |  直到 15 年前
        1
  •  3
  •   Brian Moeskau    15 年前

    Store.getAt 需要其内部集合的索引。你是说 Store.getById 相反?