diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java index 837f22792..20f2860e1 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java @@ -36,33 +36,44 @@ import com.opensymphony.xwork2.util.ValueStack; * attribute must be build using the <s:url/> tag. *
* - *- * - * Update target content with html returned from an action: + **/ @StrutsTag(name="a", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AnchorTag", description="Renders an HTML anchor element that when clicked calls a URL via remote XMLHttpRequest and updates " +Examples
* + *Update target content with html returned from an action:
+ * + ** <div id="div1">Div 1</div> * <s:url id="ajaxTest" value="/AjaxTest.action"/> * * <sx:a id="link1" href="%{ajaxTest}" target="div1"> * Update Content * </sx:a> + *+ * * - * Submit form(anchor inside the form): - * + *Submit form(anchor inside the form):
+ * + ** <s:form id="form" action="AjaxTest"> * <input type="textbox" name="data"> * <sx:a>Submit form</sx:a> * </s:form> + *+ * * - * Submit form(anchor outside the form) - * + *Submit form(anchor outside the form)
+ * + ** <s:form id="form" action="AjaxTest"> * <input type="textbox" name="data"> * </s:form> * * <sx:a formId="form">Submit form</sx:a> + *+ * * - * Using topics: + *Using topics:
+ * + ** * - * <sx:a beforeNotifyTopics="/before">Publish topics</sx:a> - * + * <sx:a beforeNotifyTopics="/before">Publish topics</sx:a> + *+ * *