Author: mgrigorov
Date: Sat Sep 25 17:51:18 2010
New Revision: 1001286

URL: http://svn.apache.org/viewvc?rev=1001286&view=rev
Log:
WICKET-3060 Format the file. No functional changes


Modified:
    
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteRenderer.java

Modified: 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteRenderer.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteRenderer.java?rev=1001286&r1=1001285&r2=1001286&view=diff
==============================================================================
--- 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteRenderer.java
 (original)
+++ 
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/AbstractAutoCompleteRenderer.java
 Sat Sep 25 17:51:18 2010
@@ -53,11 +53,11 @@ public abstract class AbstractAutoComple
                }
                textValue = textValue.replaceAll("\\\"", """);
 
-        response.write("<li textvalue=\"" + textValue + "\"");
-        final CharSequence handler = getOnSelectJavascriptExpression(object);
-        if(handler != null)
-            response.write(" onselect=\"" + handler + '"');
-        response.write(">");
+               response.write("<li textvalue=\"" + textValue + "\"");
+               final CharSequence handler = 
getOnSelectJavascriptExpression(object);
+               if (handler != null)
+                       response.write(" onselect=\"" + handler + '"');
+               response.write(">");
                renderChoice(object, response, criteria);
                response.write("</li>");
        }
@@ -99,47 +99,54 @@ public abstract class AbstractAutoComple
         */
        protected abstract String getTextValue(T object);
 
-    /**
-     * Allows the execution of a custom javascript expression when an item is 
selected in the autocompleter popup (either by
-     * clicking on it or hitting enter on the current selection).
-     * <p/>
-     * The javascript to execute must be a javascript expression that will be 
processed using javascript's eval().
-     * The function should return the textvalue to copy it into the 
corresponding form input field (the default behavior).
-     *
-     * the current text value will be in variable 'input'.
-     *
-     * If the function returns <code>null</code> the chosen text value will be 
ignored.
-     * <p/>
-     * example 1:
-     * <pre>
-     * protected CharSequence getOnSelectJavascript(Address address)
-     * {
-     *    final StringBuilder js = new StringBuilder();
-     *    js.append("wicketGet('street').value ='" + address.getStreet() + 
"';");
-     *    js.append("wicketGet('zipcode').value ='" + address.getZipCode() + 
"';");
-     *    js.append("wicketGet('city').value ='" + address.getCity() + "';");
-     *    js.append("input"); // <-- do not use return statement here!
-     *    return js.toString();
-     * }
-     * </pre>
-     * example 2:
-     * <pre>
-     * protected CharSequence getOnSelectJavascript(Currency currency)
-     * {
-     *    final StringBuilder js = new StringBuilder();
-     *    js.append("val rate = 
ajaxGetExchangeRateForCurrency(currencySymbol);");
-     *    js.append("if(rate == null) alert('exchange rate service currently 
not available');");
-     *    js.append("rate");
-     *    return js.toString();
-     * }
-     * </pre>
-     * Then the autocompleter popup will be closed.
-     *
-     * @param item the autocomplete item to get a custom javascript expression 
for
-     * @return javascript to execute on selection or <code>null</code> if 
default behavior is intented
-     */
-    protected CharSequence getOnSelectJavascriptExpression(T item)
-    {
-      return null;
-    }
+       /**
+        * Allows the execution of a custom javascript expression when an item 
is selected in the
+        * autocompleter popup (either by clicking on it or hitting enter on 
the current selection).
+        * <p/>
+        * The javascript to execute must be a javascript expression that will 
be processed using
+        * javascript's eval(). The function should return the textvalue to 
copy it into the
+        * corresponding form input field (the default behavior).
+        * 
+        * the current text value will be in variable 'input'.
+        * 
+        * If the function returns <code>null</code> the chosen text value will 
be ignored.
+        * <p/>
+        * example 1:
+        * 
+        * <pre>
+        * protected CharSequence getOnSelectJavascript(Address address)
+        * {
+        *      final StringBuilder js = new StringBuilder();
+        *      js.append(&quot;wicketGet('street').value ='&quot; + 
address.getStreet() + &quot;';&quot;);
+        *      js.append(&quot;wicketGet('zipcode').value ='&quot; + 
address.getZipCode() + &quot;';&quot;);
+        *      js.append(&quot;wicketGet('city').value ='&quot; + 
address.getCity() + &quot;';&quot;);
+        *      js.append(&quot;input&quot;); // &lt;-- do not use return 
statement here!
+        *      return js.toString();
+        * }
+        * </pre>
+        * 
+        * example 2:
+        * 
+        * <pre>
+        * protected CharSequence getOnSelectJavascript(Currency currency)
+        * {
+        *      final StringBuilder js = new StringBuilder();
+        *      js.append(&quot;val rate = 
ajaxGetExchangeRateForCurrency(currencySymbol);&quot;);
+        *      js.append(&quot;if(rate == null) alert('exchange rate service 
currently not available');&quot;);
+        *      js.append(&quot;rate&quot;);
+        *      return js.toString();
+        * }
+        * </pre>
+        * 
+        * Then the autocompleter popup will be closed.
+        * 
+        * @param item
+        *            the autocomplete item to get a custom javascript 
expression for
+        * @return javascript to execute on selection or <code>null</code> if 
default behavior is
+        *         intented
+        */
+       protected CharSequence getOnSelectJavascriptExpression(T item)
+       {
+               return null;
+       }
 }


Reply via email to