[Seaside] bug in JQAutocomplete JSON encoding

Lukas Renggli renggli at gmail.com
Tue Feb 2 22:10:38 UTC 2010

Thank you for the suggestion, I fixed it accordingly.


On 1 February 2010 22:45, Nick Ager <nick.ager at gmail.com> wrote:
> The JQuery documentation for the new autocomplete widget
> (http://docs.jquery.com/UI/Autocomplete), states:
>> 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.
> To implement this behaviour I passed a block to
> JQAutocomplete>>sourceCallback: which returned an array of Dictionaries
> using keys #value and #label. However this didn't work. Eventually I noticed
> the Json passed to the client side JQuery wasn't properly formed. The fix is
> to change the following line in JQAutocomplete>>sourceCallback:
> old version:
> self source: ((self jQuery getJson
> text: [ :stream | stream javascript: (aOneArgumentBlock value: term) ];
> changed version:
> self source: ((self jQuery getJson
> text: [ :stream | stream json: (aOneArgumentBlock value: term)];
> Note this modification makes use of the json fixes and improvements Bart
> documented in the mail
> list: http://lists.squeakfoundation.org/pipermail/seaside/2010-January/022458.html
> Once Bart's json fixes go in, I'll check this fix in, unless I hear
> otherwise...
> Nick
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Lukas Renggli

More information about the seaside mailing list