[Seaside] autocomplete lists of links
Lukas Renggli
renggli at gmail.com
Thu Mar 19 15:53:18 UTC 2009
Have a look at SUAutocompleterTest for a working example.
You shouldn't instantiate components while rendering, this will create
a new instance with every request what is rarely what you want. Slime
detects such problems.
Lukas
On Thu, Mar 19, 2009 at 4:48 PM, Steve Lloyd <steve.lloyd at ibo.org> wrote:
> I'm generating a list of links in an autocompleter
>
> SearchComponent>>#renderContentOn
>
> script: (html autocompleter
> element: 'schoolTerm';
> on: #renderSchoolListOn: of: self).
>
>
> SearchComponent>>#renderSchoolListOn
>
> list := SalesListMenuComponent new.
> (items first: (items size min: 10))
> do: [:each | list
> addEntry: each schoolString
> withAction: [ self halt. each viewQueries ]].
>
> The list renders fine, with links, but the action isn't being called when one is selected.
>
> I'm probably missing something completely obvious....
>
>
> International Baccalaureate Steve Lloyd ICT Technical Analyst - Research Engineer
> Peterson House, Malthouse Ave. Cardiff Gate, CARDIFF CF23 8GL, United Kingdom
> Tel: +44 (0)2920 547869 | Fax: +44 (0)2920 547779 | Web: http://www.ibo.org_______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the seaside
mailing list