On Thu, Sep 23, 2010 at 5:02 PM, Arne Kepp <[email protected]> wrote:
> On 9/23/10 4:52 PM, Eric Lemoine wrote:
>>
>> Also, does the bug trigger only when the date field has actually been
>> updated?
>
> No, the dates are included and incorrectly formatted also when I change an
> integer column in a row that has the date set. If the date is null
> everything is fine.
Oh ok, it might make sense.
> Could you give me a hint in what class the store.get() happens? I'm having a
> bit of trouble finding the right place to put the break points.
See the attached patch.
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
diff --git a/lib/GeoExt/data/FeatureStore.js b/lib/GeoExt/data/FeatureStore.js
index 07dbc35..622b6b0 100644
--- a/lib/GeoExt/data/FeatureStore.js
+++ b/lib/GeoExt/data/FeatureStore.js
@@ -389,7 +389,11 @@ GeoExt.data.FeatureStoreMixin = function() {
function(field) {
var key = field.mapping || field.name;
if (!defaultFields.containsKey(key)) {
- attributes[key] = record.get(field.name);
+ var val = record.get(field.name);
+ if(val instanceof Date && field.dateFormat) {
+ val = val.format(field.dateFormat);
+ }
+ attributes[key] = val;
}
}
);
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev