diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js index 8da9148ae..bb9af8f56 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js @@ -107,8 +107,8 @@ dojo.widget.defineWidget( } } - 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); @@ -117,10 +117,6 @@ dojo.widget.defineWidget( 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); - } }, highlight : function() {