Ext.Calendar 的 phantom的问题
a great component, but seem there is problem when loading data from remote httpProxy.
The record are marked as 'Phantom=true'.
The records Should be marked with a Phantom as 'false' as it is real 'record'.
The consequence is, when you drag the 'event' in the calendar the HttpProxy.api called is 'create' as the record is considered as new, because of the phantom property.
If the phantom property was false the api called would be automaticaly update.
I did not find a solution to change this property from the EventRecord.
thanks.
this.eventStore = new Ext.data.JsonStore({
url: '/events.json',
restful: true,
root: 'events',
id: 'eventStore',
idProperty: 'id',
totalProperty: 'total',
autoLoad: true,
remoteSort: true,
fields: Ext.calendar.EventRecord.prototype.fields.getRange(),
//************The Writer object which processes a record object for being written to the server-side database.
writer: new Ext.data.JsonWriter({
encode:true,
writeAllFields:true //write all fields, not just those that changed
}),
sortInfo: {
field: 'StartDate',
direction: 'ASC'
}
});
上面的这个问题是 有人在ExtJs官方网站提出的问题,我最近也碰到了同样的问题,正好解决了,想给这个哥们回复一下,但是 sencha不让我进行回复,所以只好在这把它写出来:
上面的问题主要是关于Ext.Calendar的问题,由于每次从store中导入数据的时候
store中的record的phantom属性都为 true,但是实际上这些信息是在数据库中存在的 应该是 phantome = false ,这样就会倒是使用restful方式进行提交的时候总是调用create方式的post 本来是要进行对记录更新的,应该使用 update的 put 。
问题基本上就是上述的问题, 主要是集中在phantom = true这个问题上。
经过我的学习与研究,发现 Extjs这堆险恶的人 对页面进行了很不好的处理,
他故意席上 id:'eventStore'进行误导你,这里的id其实就是idProperty,如果存在id这个属性会覆盖idProperty属性,所以导致idProperty。
Ext 的store不能识别id,所以就吧phantom 属性全部都只为 true.
经过我的研究改成如下方式即可
this.eventStore = new Ext.data.JsonStore({
url: '/events.json',
restful: true,
root: 'events',
storeId: 'eventStore',
idProperty: 'id',
totalProperty: 'total',
autoLoad: true,
remoteSort: true,
fields: Ext.calendar.EventRecord.prototype.fields.getRange(),
//************The Writer object which processes a record object for being written to the server-side database.
writer: new Ext.data.JsonWriter({
encode:true,
writeAllFields:true //write all fields, not just those that changed
})
});
注意,把 id: 'eventStore' 改为 storeId: 'eventStore'即可。
好了,说了一大堆就一个小问题,问题解决了。哈哈哈。
分享到:
相关推荐
to your favorite color. You can even swipe two fingers along the touchpad to swap profiles without the need to even open back the program.
在Matlab图像处理工具箱中的Phantom函数,可以产生Shepp -Logan的大脑图,该图作为一个测试图,可反映人大脑的许多性质
phantom - 用于集成PhantomJS的NodeJS模块
phantom.plugin.1.54.zip phantom.plugin.1.54.zip
枫之谷魅影技能的涵盖v83枫的故事开始的。
Phantom 是满帮集团开源的一套稳定、灵活、兼容性好的 Android 插件化方案
fft源代码,#include "f2407_c.h" #include "math.h" #define N 32 // FFT变换的点数 extern void fft(void); ...interrupt void phantom(void); void sysinit(void); extern int input[2*N];
oxit Phantom是一款为企业准备的专业PDF电子文档套件,运行速度快捷、简单易用且价格实惠。该软件功能十分齐全,可以用它来创建专业的PDF文档,让商务办公更加简单流畅。
foxit phantom绿色版破解版Foxit Phantom 新增功能 ====================================================================================================================== 1. 安全工具 2. 数字签名工具 3. ...
Foxit Phantom是一个商业级的PDF应用软件,是一个集创建,阅读和编辑PDF为一体的新工具.
通过该控件,可以使用VC,VB,DELPHI等控制乐高RCX机器人
经典SAP idoc教材,word版本 Where Has the Money Gone? 1 1.1 Communication.....................................................................................much project is lost in chasing the phantom. 4
---[ PhantOm plugin 1.54 ]-------------------------------------------------- by Hellsp@wn & Archer & Olenevod. | Bronco, kioresk, RSI, lord_Phoenix, HoBleen, Grim Fandango, | Guru.eXe, vad8787, PE_...
PDF阅读和简单编辑软件 Foxit Phantom是一款企业级专业的...注释:解压后请先运行“安装.exe”,再运行“Foxit Phantom.exe”就可以了。 下载地址软件报错 快车高速下载网通高速下载迅雷高速下载电信高速下载相关软件·
1、Foxit Phantom PDF Suite 是 Acrobat Reader 的最佳替代软件。 优点是体积小,启动快,功能强大。...2、使用前请右键点击文件Foxit Phantom.inf,选择菜单项"安装"进行相关的设置,完成即可使用。
/ / plug - PhantOm.dll [+] PEB BeingDebugged. [+] PEB NtGlobalFlag. [+] GetStartupInfo. [+] Process Heaps. [+] GetTickCount. [!] Protect DRx. [!] Hide DRx. [!] Fake Windows version. [!] Custom ...
仿真b超成像,换能器发射超声激励脉冲扫描盒子中的散射点及囊肿,成像
福昕PDF编辑器V8.3.0.14878企业版是最新的功能强大的PDF浏览和编辑器,这是其破解程序,对V8.3.0.14251版同样适用,已经过实际测试
主要是2维的forbild 头部体模的matlab代码