You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mu...@apache.org on 2007/06/10 01:17:29 UTC

svn commit: r545813 - /struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js

Author: musachy
Date: Sat Jun  9 16:17:28 2007
New Revision: 545813

URL: http://svn.apache.org/viewvc?view=rev&rev=545813
Log:
Fix form autodiscover for bind tags

Modified:
    struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js

Modified: struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js?view=diff&rev=545813&r1=545812&r2=545813
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js Sat Jun  9 16:17:28 2007
@@ -107,8 +107,8 @@
       }
     }
 
-    if(dojo.string.isBlank(this.href) && dojo.string.isBlank(this.formId)) {
-      //no href and no formId, we must be inside a form
+    if(dojo.string.isBlank(this.formId)) {
+      //no formId, see if we are inside a form
       this.formNode = dojo.dom.getFirstAncestorByTag(this.domNode, "form");
     } else {
       this.formNode = dojo.byId(this.formId);
@@ -116,10 +116,6 @@
 
     if(this.formNode && dojo.string.isBlank(this.href)) {
       this.href = this.formNode.action;
-    }
-
-    if(!dojo.string.isBlank(this.formId)) {
-      this.formNode = dojo.byId(this.formId);
     }
   },