Applied TAPESTRY-339 fix

git-svn-id: https://svn.apache.org/repos/asf/jakarta/tapestry/branches/branch-3-0@389527 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/org/apache/tapestry/form/LinkSubmit.java b/framework/src/org/apache/tapestry/form/LinkSubmit.java
index 07acee6..bd5860b 100644
--- a/framework/src/org/apache/tapestry/form/LinkSubmit.java
+++ b/framework/src/org/apache/tapestry/form/LinkSubmit.java
@@ -100,6 +100,7 @@
                 String formHiddenFieldAttributeName = ATTRIBUTE_FUNCTION_NAME + formName;
                 if (cycle.getAttribute(formHiddenFieldAttributeName) == null)
                 {
+                	body.addInitializationScript("document." + formName + "._linkSubmit.value = null;"); 
                     writer.beginEmpty("input");
                     writer.attribute("type", "hidden");
                     writer.attribute("name", "_linkSubmit");
diff --git a/status.xml b/status.xml
index de967a9..d3fbb3a 100644
--- a/status.xml
+++ b/status.xml
@@ -157,6 +157,9 @@
       <action type="fix" dev="JK" fixes-bug="TAPESTRY-422" due-to="Brian K. Wallace" >
       	Patches to Javadoc to explicitly state that URLs returned from ExternalService will already be encoded.
       </action>
+      <action type="fix" dev="JK" fixes-bug="TAPESTRY-339" due-to="Nick Westgate" >
+      	If LinkSubmit is mixed with other submit components in the same form, erroneous submits can occur from pages accessed via the browser back button. This happens because LinkSubmit's hidden variable is never reset. 
+      </action>
     </release>
     <release version="3.0.3" date="Mar 26 2005">
       <action type="fix" dev="PF" fixes-bug="TAPESTRY-278"> Fixes security flaw in asset service. </action>