You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Manuel Corrales <ma...@gmail.com> on 2008/05/21 01:06:12 UTC

Autocomplete component

Hi, i have s doubt about autocomplete component. According to the
documentation, you can return a list of any objects on the
onProvideCompletions, my question is, when i choose a value, this value is
going to be the object from that list? or just a string and i have to make a
match beetwen the string and the real object?

Thanks very much!

Re: Autocomplete component

Posted by Marcus <mv...@gmail.com>.
Hi,

Using autocomplete mixin, how do we know, if an option of the list provided
was selected, or if user has entered another text?

Would be great if some event was fired on server side when user select one
of option provided by mixin.

Thanks,

Marcus

Re: Autocomplete component

Posted by Manuel Corrales <ma...@gmail.com>.
Ok, thanks!

On Tue, May 20, 2008 at 8:25 PM, Josh Canfield <jo...@thedailytube.com>
wrote:

> The Autocomplete calls toString on each of the objects that you
> return, and that is the value that is set into your input box.
>
> You can check out the source for the component it's pretty short.
>
> http://tapestry.apache.org/tapestry5/apidocs/src-html/org/apache/tapestry/corelib/mixins/Autocomplete.html
>
> If you want more complex data to be displayed then you can extend the
> class and implement the generateResponseMarkup method. As of 5.0.11
> extending the client side behavior when the user chooses a value is
> not possible, as far as I could find.
>
>
> Josh
>
> On Tue, May 20, 2008 at 4:06 PM, Manuel Corrales
> <ma...@gmail.com> wrote:
> > Hi, i have s doubt about autocomplete component. According to the
> > documentation, you can return a list of any objects on the
> > onProvideCompletions, my question is, when i choose a value, this value
> is
> > going to be the object from that list? or just a string and i have to
> make a
> > match beetwen the string and the real object?
> >
> > Thanks very much!
> >
>
>
>
> --
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Autocomplete component

Posted by Josh Canfield <jo...@thedailytube.com>.
The Autocomplete calls toString on each of the objects that you
return, and that is the value that is set into your input box.

You can check out the source for the component it's pretty short.
http://tapestry.apache.org/tapestry5/apidocs/src-html/org/apache/tapestry/corelib/mixins/Autocomplete.html

If you want more complex data to be displayed then you can extend the
class and implement the generateResponseMarkup method. As of 5.0.11
extending the client side behavior when the user chooses a value is
not possible, as far as I could find.


Josh

On Tue, May 20, 2008 at 4:06 PM, Manuel Corrales
<ma...@gmail.com> wrote:
> Hi, i have s doubt about autocomplete component. According to the
> documentation, you can return a list of any objects on the
> onProvideCompletions, my question is, when i choose a value, this value is
> going to be the object from that list? or just a string and i have to make a
> match beetwen the string and the real object?
>
> Thanks very much!
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org