On Monday, June 21, 2010, giraam <[email protected]> wrote: > > I'm thinking on something like this! Let me know if you have a better opinion > or correct me if I'm wrong: > > > var_number = 9; // just an example > > function setDetails() { > feats = pdv_nuevo.features; > for(i = 0; i < feats.length; i++) { > feats[i].attributes.COD_PULP = var_number; > } > } > > > So I call this function before I save the changes like this: > > > toolbar.addControl( > new OpenLayers.Control.Button({ > title: "Guardar", > trigger: function() { > setDetails(); > saveStrategy.save(); > } > }),{ > iconCls: 'salvar' > }); > > > What do you think?!
Hi. It looks good to me. Alternatively you could register a "start" listener on the save strategy and modify your feature attributes in there. -- 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 _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
