mirror of
https://github.com/apache/struts.git
synced 2026-09-11 00:29:40 +00:00
Split examples
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@528275 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -36,33 +36,44 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* attribute must be build using the <s:url/> tag.
|
||||
* </p>
|
||||
* <!-- END SNIPPET: javadoc -->
|
||||
* <pre>
|
||||
* <!-- START SNIPPET: examples -->
|
||||
* <b>Update target content with html returned from an action:</b>
|
||||
* <p>Examples</p>
|
||||
*
|
||||
* <p>Update target content with html returned from an action:</p>
|
||||
* <!-- START SNIPPET: example1 -->
|
||||
* <pre>
|
||||
* <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>
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example1 -->
|
||||
*
|
||||
* <b>Submit form(anchor inside the form):</b>
|
||||
*
|
||||
* <p>Submit form(anchor inside the form):</p>
|
||||
* <!-- START SNIPPET: example2 -->
|
||||
* <pre>
|
||||
* <s:form id="form" action="AjaxTest">
|
||||
* <input type="textbox" name="data">
|
||||
* <sx:a>Submit form</sx:a>
|
||||
* </s:form>
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example2 -->
|
||||
*
|
||||
* <b>Submit form(anchor outside the form)</b>
|
||||
*
|
||||
* <p>Submit form(anchor outside the form)</p>
|
||||
* <!-- START SNIPPET: example3 -->
|
||||
* <pre>
|
||||
* <s:form id="form" action="AjaxTest">
|
||||
* <input type="textbox" name="data">
|
||||
* </s:form>
|
||||
*
|
||||
* <sx:a formId="form">Submit form</sx:a>
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example3 -->
|
||||
*
|
||||
* <b>Using topics:</b>
|
||||
* <p>Using topics:</p>
|
||||
* <!-- START SNIPPET: example4 -->
|
||||
* <pre>
|
||||
* <script type="text/javascript">
|
||||
* dojo.event.topic.subscribe("/before", function(data, type, e){
|
||||
* alert('inside a topic event. before request');
|
||||
@@ -73,8 +84,9 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* });
|
||||
* </script>
|
||||
*
|
||||
* <sx:a beforeNotifyTopics="/before">Publish topics</sx:a>
|
||||
* <!-- END SNIPPET: examples -->
|
||||
* <sx:a beforeNotifyTopics="/before">Publish topics</sx:a>
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example4 -->
|
||||
* </pre>
|
||||
*/
|
||||
@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 " +
|
||||
|
||||
Reference in New Issue
Block a user