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/06/03 17:18:16 UTC
svn commit: r543918 -
/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java
Author: musachy
Date: Sun Jun 3 08:18:15 2007
New Revision: 543918
URL: http://svn.apache.org/viewvc?view=rev&rev=543918
Log:
Update autocompleter tag documentation
Modified:
struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java
Modified: struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java?view=diff&rev=543918&r1=543917&r2=543918
==============================================================================
--- struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java (original)
+++ struts/struts2/trunk/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java Sun Jun 3 08:18:15 2007
@@ -42,12 +42,19 @@
* ["Text2", "Value2"]
* ]
* </pre>
- * <p>2. If a value is specified in the "dataFieldName" attribute, and the response has a field with that
+ * <p>2. If the response is a map, use it (recommended as it is the easiest one to generate):
+ * <pre>
+ * {
+ * "Alabama" : "AL",
+ * "Alaska" : "AL"
+ * }
+ * </pre>
+ * <p>3. If a value is specified in the "dataFieldName" attribute, and the response has a field with that
* name, assume that's the datasource, which can be an array of 2-dimension array elements, or a map,
- * like (assuming dataFieldName="states"):</p>
+ * like (assuming dataFieldName="state"):</p>
* <pre>
* {
- * "states" : [
+ * "state" : [
* ["Alabama","AL"],
* ["Alaska","AK"]
* ]
@@ -56,7 +63,7 @@
* or
*
* {
- * "states" : {
+ * "state" : {
* "Alabama" : "AL",
* "Alaska" : "AK"
* }