我有一个网格和关联的存储,用于显示有关两个不同实体的数据,即 System 和 Customer 。如果在单击系统链接后显示网格,则要使用的 url 是 /configuration/ systemid /234,如果它来自客户链接,则 url 应该是 /configuration/ customerid /234。请注意,值 234 也会发生变化。如何在 ExtJs4 MVC 模型中实现这一点。
有没有办法提供如下网址并替换占位符?网址:'/configuration/{context}/{contextid}'
或者我可以将上下文存储在一个对象中并在此处使用它,例如 '/configuration/' + Context.type + '/' + Context.id
还是有一个标准的解决方案?
url 由后端 dvlprs 给出,不能更改:(
我的商店定义如下
Ext.define('MyApp.store.Configuration', {
extend: 'Ext.data.Store',
model: 'MyApp.model.Configuration',
autoLoad: true,
proxy: {
type: 'ajax',
url : '/configuration/customerid/234'
}
})
谢谢