[Seaside] autocomplete lists of links
Steve Lloyd
steve.lloyd at ibo.org
Fri Mar 20 12:20:26 UTC 2009
Thanks Lucas
I can see Slime is going to prove useful.
I did start off with the example in SUAutocompleterTest, but in this case I'm not needing to do the triggerFormElement: on the textinput field, rather the generated dynamic list of matched strings have anchors which I then want to click on and invoke their actions.
Steve
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
________________________________________
From: seaside-bounces at lists.squeakfoundation.org [seaside-bounces at lists.squeakfoundation.org] On Behalf Of Lukas Renggli [renggli at gmail.com]
Sent: 19 March 2009 15:53
To: Seaside - general discussion
Subject: Re: [Seaside] autocomplete lists of links
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
_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list