diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java index 869c11600..6283aef2e 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java @@ -137,12 +137,12 @@ public class Bind extends AbstractValidateBean { addParameter("events", findString(events)); } - @StrutsTagAttribute(description="Comma delimited list of event names to attach to", required=true) + @StrutsTagAttribute(description="Comma delimited list of event names to attach to") public void setEvents(String events) { this.events = events; } - @StrutsTagAttribute(description="Comma delimited list of ids of the elements to attach to", required=true) + @StrutsTagAttribute(description="Comma delimited list of ids of the elements to attach to") public void setSources(String sources) { this.sources = sources; } 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 29f40c04a..ee9c59190 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 @@ -239,7 +239,7 @@ dojo.widget.defineWidget( if(topicsArray) { dojo.lang.forEach(topicsArray, function(topic) { try { - if(data) { + if(data != null) { dojo.event.topic.publish(topic, data, e, self); } else { dojo.event.topic.publish(topic, e, self); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js index 99c83b1d4..4bac37afc 100644 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js +++ b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js @@ -133,7 +133,7 @@ dojo.widget.defineWidget( if(topicsArray) { dojo.lang.forEach(topicsArray, function(topic) { try { - if(data) { + if(data != null) { dojo.event.topic.publish(topic, data, e, self); } else { dojo.event.topic.publish(topic, e, self); diff --git a/plugins/dojo/src/main/resources/template/ajax/bind.ftl b/plugins/dojo/src/main/resources/template/ajax/bind.ftl index 114d2fe5c..369b205f2 100644 --- a/plugins/dojo/src/main/resources/template/ajax/bind.ftl +++ b/plugins/dojo/src/main/resources/template/ajax/bind.ftl @@ -1,8 +1,12 @@