code: function(response) {
          var evt = {"response": response};
          if(response.success()) {
              var features = response.reqFeatures;
              // deal with inserts, updates, and deletes
              var state, feature;
              var destroys = [];
              var insertIds = response.insertIds || [];
              var j = 0;
              for(var i=0, len=features.length; i<len; ++i) {
                  feature = features[i];
                  // if projection was different, we may be dealing with clones
                  feature = feature._original || feature;
                  state = feature.state;
                  if(state) {
                      if(state == OpenLayers.State.DELETE) {
                          destroys.push(feature);
                      } else if(state == OpenLayers.State.INSERT) {
                          feature.fid = insertIds[j];
                          ++j;
                      }
                      feature.state = null;
                  }
              }
  
              if(destroys.length > 0) {
                  this.layer.destroyFeatures(destroys);
              }
  
              this.events.triggerEvent("success", evt);
  
          } else {
              this.events.triggerEvent("fail", evt);
          }
      }
docs: Method: onCommit
  Called after protocol commit.
  
  Parameters:
  response - {<OpenLayers.Protocol.Response>} A response object.