Open chrismayer opened 8 years ago
@chrismayer, did you make this work in your application and would you be able to provide a PR?
Hi @bentrm,
I recently started to fix this.
1.) isn't really a problem but 2.) is caused deep in the ExtJS 'proxy-/reader-world'. I already had a intensive look into that and could figure out that the error is related to the extractData
-method of Ext-data-reader-Reader
. In this method the fieldExtractorInfo
remains empty which causes the wrong data mapping in our records. I am sure if we find the cause for the empty fieldExtractorInfo
we can fix the problem. Would be cool if someone else could have a look on that. I will also proceed if I have free timeslots.
Shall I open a PR with the fix for 1.) which can be used a base for further commits?
It's a good start I guess. The whole Ext-proxy/reader stuff :copyright: is a bit hard to reason about..
Is this in any way related to #173 and #162?
I guess. At least #173 seems to be related somehow. For #162 I am not sure.
I just opened a PR (#384) which fixes 1.) and can be used as base for further development.
I have discovered issues which prevent a FeaturStore loading its data via Proxy correctly when using ExtJS 5, like this:
This can be tested with the example here, which is by the way not listed on the GeoExt 2 webpage.
I found 2 reasons for this:
1.) In https://github.com/geoext/geoext2/blob/master/src/GeoExt/data/proxy/Protocol.js#L196 we call
operation.setSuccessful();
which in ExtJS 5 also callsoperation.setCompleted();
and we also call the later explicitly the line before. This leeds to a double call of the operation callbacks, what ends in an empty FeatureStore. In ExtJS 4operation.setSuccessful()
did not calloperation.setCompleted()
so this issue did not appear.2.) Once the data is loaded correctly one will discover that the attributes of the loaded feature(s) are not mapped correctly to the record, so the UIs (e.g. columns a grid) will remain empty. Here it seems we have to apply the attributes explicitly in case of using ExtJS 5.