<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Unable to Rollback changes on WFS update failure</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">Hi,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">I'm trying to create an editable map based upon the OpenLayers wfs-protocol-transactions example. On some occasions (for example when other users have updated features) I want to abandon the outstanding edit on a feature and redraw it as it was originally obtained from the base WFS service. I couldn&#8217;t work out how to do that and have reverted to trying to redraw the entire layer using the layer.redraw and layer.refresh functions. Unfortunately nothing seems to work. The features stay as drawn</FONT></SPAN><SPAN LANG="en-ca"><FONT FACE="Calibri">, which no longer matches what is in the geoserver</FONT></SPAN><SPAN LANG="en-ca"> <FONT FACE="Calibri">service</FONT></SPAN><SPAN LANG="en-ca"><FONT FACE="Calibri">. How do I do some equivalent of &quot;undo this feature and cancel any pending changes on it&quot;</FONT></SPAN><SPAN LANG="en-ca"><FONT FACE="Calibri">, or</FONT></SPAN><SPAN LANG="en-ca"> <FONT FACE="Calibri">alternatively</FONT></SPAN><SPAN LANG="en-ca"><FONT FACE="Calibri"></FONT></SPAN><SPAN LANG="en-ca"> <FONT FACE="Calibri">&#8220;</FONT></SPAN><SPAN LANG="en-ca"><FONT FACE="Calibri">refresh this feater (or if necessary all features) from the WFS service.</FONT></SPAN><SPAN LANG="en-ca">&nbsp;<FONT FACE="Calibri"> The code fragment I have at this point is:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp;&nbsp;&nbsp; var saveStrategy = new OpenLayers.Strategy.Save</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">({</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">onCommit: function(response)</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">if (response.success())</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">{</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">alert(&quot;Good&quot;);&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">alert(response.priv.responseText);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">} else&nbsp; {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">alert(&quot;Bad&quot;);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">alert(response.priv.responseText);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">} </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">if (confirm(&quot;Do you want to abort this request ?&quot;))</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">{</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">alert(&quot;Abort request here&quot;);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">this.layer.refresh(true);</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">this.layer.redraw();&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">}</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">});&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp;&nbsp;&nbsp; wfs = new OpenLayers.Layer.Vector(&quot;Editable Features&quot;, {</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca"><FONT FACE="Calibri">&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND SO ON...</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">Any Suggestions ?</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></P>

<P DIR=LTR><SPAN LANG="en-ca">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT FACE="Calibri">David G.</FONT></SPAN><SPAN LANG="en-ca"></SPAN></P>

</BODY>
</HTML>