【问题标题】:Understanding ExtJS model associations理解 ExtJS 模型关联
【发布时间】:2018-05-17 01:57:16
【问题描述】:

我试图了解 ExtJS 关联是如何工作的。我还没有找到一个可以理解的关于这个问题的教程,它涵盖了我的两个主要用例,尤其是 ExtJS 如何区分这两者:

  • 两个模型之间通过“Id”引用关联。
  • 两个模型之间通过父子关系关联。

I have laid the ground in this fiddle,有人可以帮我填补空白吗?

【问题讨论】:

  • 我很困惑...当您在 ComplexData 中选择一个项目时,您只是想填充 SubItems 网格吗?区分您列出的两个项目是什么意思?
  • @incutonez 当我同步时,ExtJS 必须在新创建的对象上建立关联。它可以通过使子项成为子对象的列表,或者通过子记录中的 Id 引用主记录来实现。

标签: extjs extjs6


【解决方案1】:
 **fields: [
        {name: 'AA', mapping: 'qq'},
        {name: 'SS', mapping: 'pp'},
    ]**

The **name** you write the name given in gui part 
eg:
{
xtype:'mytext',
label:'',
**name:'AA',**
editable:true
}

when you receive responses like this and in xml so the data is mapped like this:
*<wer>
<qq>data</qq>
<>data</>
</wer>*


so, we map the response data to name in gui.....

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-01
    • 1970-01-01
    相关资源
    最近更新 更多