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/05/30 18:22:55 UTC

svn commit: r542861 - /struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java

Author: musachy
Date: Wed May 30 09:22:53 2007
New Revision: 542861

URL: http://svn.apache.org/viewvc?view=rev&rev=542861
Log:
Improve bind tag documentation

Modified:
    struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java

Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java?view=diff&rev=542861&r1=542860&r2=542861
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java Wed May 30 09:22:53 2007
@@ -36,15 +36,28 @@
  * making an asynchronous request to the specified href, and updating multiple targets.
  * </p>
  * <!-- END SNIPPET: javadoc -->
+ * 
  * <p>Examples</p>
+ * 
+ * <!-- START SNIPPET: example0 -->
+ * <p>Without attaching to an event, listening to a topic (used to make an Ajax call)</p>
+ * <pre>
+ * &lt;sx:bind href="%{#ajaxTest}" listenTopics="/makecall"/&gt;
+ * &lt;s:submit onclick="dojo.event.topic.publish('/makecall')"/&gt;
+ * </pre>
+ * <!-- END SNIPPET: example0 -->
+ * 
  * <!-- START SNIPPET: example1 -->
+ * <p>Attached to event 'onclick' on submit button</p>
  * <pre>
  * &lt;img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/&gt;
  * &lt;sx:bind id="ex1" href="%{#ajaxTest}" sources="button" targets="div1" events="onclick" indicator="indicator" /&gt;
  * &lt;s:submit theme="simple" type="submit" value="submit" id="button"/&gt;
  * </pre>
  * <!-- END SNIPPET: example1 -->
+ * 
  * <!-- START SNIPPET: example2 -->
+ * <p>Submit form</p>
  * <pre>
  * &lt;sx:bind id="ex3" href="%{#ajaxTest}" sources="chk1" targets="div1" events="onchange" formId="form1" /&gt;
  * &lt;form id="form1"&gt;