mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
Fixing javadocs for snippet plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@577743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -92,42 +92,33 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* <p>Examples</p>
|
||||
* <!-- START SNIPPET: example1 -->
|
||||
* <p>Autocompleter that gets its list from an action:</p>
|
||||
* <pre>
|
||||
* <sx:autocompleter name="autocompleter1" href="%{jsonList}"/>
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example1 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example2 -->
|
||||
* <p>Autocompleter that uses a list:</p>
|
||||
* <pre>
|
||||
* <s:autocompleter name="test" list="{'apple','banana','grape','pear'}" autoComplete="false"/>
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example2 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example3 -->
|
||||
* <p>Autocompleter that reloads its content everytime the text changes (and the length of the text is greater than 3):</p>
|
||||
* <pre>
|
||||
* <sx:autocompleter name="mvc" href="%{jsonList}" loadOnTextChange="true" loadMinimumCount="3"/>
|
||||
*
|
||||
* The text entered on the autocompleter is passed as a parameter to the url specified in "href", like (text is "struts"):
|
||||
*
|
||||
* http://host/example/myaction.do?mvc=struts
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example3 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example4 -->
|
||||
* <p>Linking two autocompleters:</p>
|
||||
* <pre>
|
||||
* <form id="selectForm">
|
||||
* <sx:autocompleter name="select" list="{'fruits','colors'}" valueNotifyTopics="/changed" />
|
||||
* </form>
|
||||
* <sx:autocompleter href="%{jsonList}" formId="selectForm" listenTopics="/changed"/>
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example4 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example5 -->
|
||||
* <p>Set/Get selected values using JavaScript</p>
|
||||
* <pre>
|
||||
* <sx:autocompleter href="%{jsonList}" id="auto"/>
|
||||
* <script type="text/javascript">
|
||||
* function getValues() {
|
||||
@@ -156,12 +147,10 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* autoCompleter.setAllValues("AL", "Alabama");
|
||||
* }
|
||||
* </script>
|
||||
* </pre>
|
||||
* <!-- START SNIPPET: example5 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example6 -->
|
||||
* <p>Using beforeNotifyTopics:</p>
|
||||
* <pre>
|
||||
* <script type="text/javascript">
|
||||
* dojo.event.topic.subscribe("/before", function(event, widget){
|
||||
* alert('inside a topic event. before request');
|
||||
@@ -171,12 +160,10 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* </script>
|
||||
*
|
||||
* <sx:autocompleter beforeNotifyTopics="/before" href="%{#ajaxTest} />
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example6 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example7 -->
|
||||
* <p>Using afterNotifyTopics:</p>
|
||||
* <pre>
|
||||
* <script type="text/javascript">
|
||||
* dojo.event.topic.subscribe("/after", function(data, request, widget){
|
||||
* alert('inside a topic event. after request');
|
||||
@@ -187,12 +174,10 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* </script>
|
||||
*
|
||||
* <sx:autocompleter afterNotifyTopics="/after" href="%{#ajaxTest}" />
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example7 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example8-->
|
||||
* <p>Using errorNotifyTopics:</p>
|
||||
* <pre>
|
||||
* <script type="text/javascript">
|
||||
* dojo.event.topic.subscribe("/error", function(error, request, widget){
|
||||
* alert('inside a topic event. on error');
|
||||
@@ -203,12 +188,10 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* </script>
|
||||
*
|
||||
* <sx:autocompleter errorNotifyTopics="/error" href="%{#ajaxTest}" />
|
||||
* </pre>
|
||||
* <!-- END SNIPPET: example8 -->
|
||||
*
|
||||
* <!-- START SNIPPET: example9 -->
|
||||
* <p>Using valueNotifyTopics and indicator:</p>
|
||||
* <pre>
|
||||
* <script type="text/javascript">
|
||||
* dojo.event.topic.subscribe("/value", function(value, key, text, widget){
|
||||
* alert('inside a topic event. after value changed');
|
||||
@@ -218,7 +201,8 @@ import com.opensymphony.xwork2.util.ValueStack;
|
||||
* //widget: widget that published the topic
|
||||
* });
|
||||
* </script>
|
||||
* <pre>
|
||||
*
|
||||
* <sx:autocompleter valueNotifyTopics="/value" href="%{#ajaxTest}" />
|
||||
* <!-- END SNIPPET: example9 -->
|
||||
*/
|
||||
@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities")
|
||||
|
||||
Reference in New Issue
Block a user