Yea, the autocompleter is not really a replacement for <select> but for <input type="text">
But i think there are ways to make it work like a select... In your autocompleter, you'll need to use : - a custom listItemRenderer that also outputs ids for every entry (they could be hidden from the user, so instead of <li>data1</li><li>data2</li> you now have <li tag="1">data1</li><li tag="2"data2</li>), - and define your own afterUpdateElement which is: ' Hook for the function called after the element has been updated (i.e. when the user has selected an entry). The function receives two parameters, the autocompletion input field and the selected item (the item selected).' The idea is that you write some js that strips the id from the selected item and stores it (perhaps in a hidden input that you'll add with every autocompleter). If you use latest beta from cvs, it's better to use the options parameter instead of afterUpdateElement, like this <binding name="options">literal:{ afterUpdateElement: function (x,y) { var id = getIdFrom(y); setElementValue('myHiddenElement', id); } }</binding> Options can take some more parameters - see http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter , + you'll find more if you look at their source. Anyway, perhaps we can add such a component in the next tacos. You can add a request for this in the bugtracker >From Pedro Viegas <[EMAIL PROTECTED]>: > Hi all, > > I'm tying to use the Tacos Autocompleter component in a way I guess it isn't > suposed to. > I have to create an interface in with I search for a specific instance of... > say a client by its name. > I want to know witch client is selected by the user. > If I search by the client name then that is what the autocompleter returns, > the problem is that I can have more than one clent with the same name. > O even if I could garantee uniqness to all list I give to my autocompleter I > still would have to issue a search to my database to get the complete > instance (POJO) corresponding to the selected client's name. > Has someone had this issue? What did you do to solve it? > I would like be able to get an ID value, or even the full object in some way > from the original list instead of having to make a new search. > > Thanks, > > -- > Pedro Viegas > -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]