diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java index ffd9e000a..1286b64c3 100644 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java +++ b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java @@ -91,17 +91,14 @@ import com.opensymphony.xwork2.util.ValueStack; * *

Examples

* - *

Autocompleter that gets its list from an action:

* <sx:autocompleter name="autocompleter1" href="%{jsonList}"/> * * * - *

Autocompleter that uses a list:

* <s:autocompleter name="test" list="{'apple','banana','grape','pear'}" autoComplete="false"/> * * * - *

Autocompleter that reloads its content everytime the text changes (and the length of the text is greater than 3):

* <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"): @@ -110,7 +107,6 @@ import com.opensymphony.xwork2.util.ValueStack; * * * - *

Linking two autocompleters:

* <form id="selectForm"> * <sx:autocompleter name="select" list="{'fruits','colors'}" valueNotifyTopics="/changed" /> * </form> @@ -118,7 +114,6 @@ import com.opensymphony.xwork2.util.ValueStack; * * * - *

Set/Get selected values using JavaScript

* <sx:autocompleter href="%{jsonList}" id="auto"/> * <script type="text/javascript"> * function getValues() { @@ -147,10 +142,9 @@ import com.opensymphony.xwork2.util.ValueStack; * autoCompleter.setAllValues("AL", "Alabama"); * } * </script> - * + * * * - *

Using beforeNotifyTopics:

* <script type="text/javascript"> * dojo.event.topic.subscribe("/before", function(event, widget){ * alert('inside a topic event. before request'); @@ -163,7 +157,6 @@ import com.opensymphony.xwork2.util.ValueStack; * * * - *

Using afterNotifyTopics:

* <script type="text/javascript"> * dojo.event.topic.subscribe("/after", function(data, request, widget){ * alert('inside a topic event. after request'); @@ -177,7 +170,6 @@ import com.opensymphony.xwork2.util.ValueStack; * * * - *

Using errorNotifyTopics:

* <script type="text/javascript"> * dojo.event.topic.subscribe("/error", function(error, request, widget){ * alert('inside a topic event. on error'); @@ -191,7 +183,6 @@ import com.opensymphony.xwork2.util.ValueStack; * * * - *

Using valueNotifyTopics and indicator:

* <script type="text/javascript"> * dojo.event.topic.subscribe("/value", function(value, key, text, widget){ * alert('inside a topic event. after value changed');