Joachim,

Please see JqSHtml.autocomplete(starting: String, build: (String, Int) =>
Seq[String], onSubmit: String => Unit)

You can build a server-side autocomplete builder such as:


  private def buildQuery(current: String, limit: Int): Seq[String] = {
    Log.info("Checking on server side with "+current+" limit "+limit)
    (1 to limit).map(n => current+""+n)
  }

Your function gets the current value and the number of elements requested...
you return a sequence on String to be sent back to the browser.

Otherwise, it's just a text field and can be used in standard and ajax
forms.

Thanks,

David


On Tue, Nov 25, 2008 at 7:39 AM, Joachim A. <[EMAIL PROTECTED]>wrote:

>
> Hi,
> I'm trying to find a way to integrate a dynamic autocompletion box in
> my Lift application.
>
> I've found JqSHtml.autocompleteObj but here's it's only possible to
> have a static list of options.
> The Javascript behind the box accepts an url parameter (which is not
> used atm).
>
> - Did somebody do the dynamic autocompletion alread?
>
> - if not, how can I turn a closure into a url which can be passed to
> the autocompletion Javascript, which does the request processing
> itself?
>
> Thanks a lot!
> Joachim
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Collaborative Task Management http://much4.us
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to