The JQuery documentation for the new autocomplete widget (<a href="http://docs.jquery.com/UI/Autocomplete">http://docs.jquery.com/UI/Autocomplete</a>), states:<div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
data can be a simple Array of Strings, or it contains Objects for each
item in the array, with a label or value property or both. The label
property is displayed in the suggestion menu, the value will be
inserted into the input element after the user selected something from
the menu.</blockquote><div><br></div><div>To implement this behaviour I passed a block to JQAutocomplete&gt;&gt;sourceCallback: which returned an array of Dictionaries using keys #value and #label. However this didn&#39;t work. Eventually I noticed the Json passed to the client side JQuery wasn&#39;t properly formed. The fix is to change the following line in JQAutocomplete&gt;&gt;sourceCallback:</div>
<div><br></div><div>old version:</div><div><br></div><div><div>self source: ((self jQuery getJson</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>text: [ :stream | stream javascript: (aOneArgumentBlock value: term) ];</div>
<div><br></div><div><br></div><div>changed version:</div></div><div><br></div><div><div>self source: ((self jQuery getJson</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>text: [ :stream | stream json: (aOneArgumentBlock value: term)];</div>
<div><br></div><div><br></div><div>Note this modification makes use of the json fixes and improvements Bart documented in the mail list: <a href="http://lists.squeakfoundation.org/pipermail/seaside/2010-January/022458.html">http://lists.squeakfoundation.org/pipermail/seaside/2010-January/022458.html</a></div>
<div><br></div><div>Once Bart&#39;s json fixes go in, I&#39;ll check this fix in, unless I hear otherwise...</div><div><br></div><div>Nick</div></div>