I used a JSON action which outputs an array of arrays like this:
[ ["VALUE", "KEY"], ["VALUE2", "KEY2"], ... ] I build the list beforehand in the Action with an iterator over a List<ObjectType>. I don't know about ftl since I've never used it. And now I'm in the process of migrating the app to use YUI, since dojo includes seem to slow down the app too much, and YUI has nicer selection of widgets and easier api... On 7/13/07, Pedro Herrera < [EMAIL PROTECTED]> wrote:
Hi Toni. How do you assemble your list ? In my case I´m using a jsp result that is made from AjaxUtil . Is it possible to use flt for this case ?. In the showcase example, uses a option.flt(value only), but I need two, key and value instead. Thanks Herrera Toni Lyytikäinen wrote: > > Whoops, sorry I should probably think before I post. So you want to set > the > key, not the value of the input element. I did this by having a > getElementKey-method in the Action class which returns the key you want as > the default. Element is the name of the input element. > > On 7/12/07, Toni Lyytikäinen <[EMAIL PROTECTED]> wrote: >> >> The value attribute sets the preset value of the input element, if that >> is >> what youre looking for. >> <s:autocompleter value="AS" etc... /> >> >> On 7/12/07, Pedro Herrera <[EMAIL PROTECTED] > wrote: >> > >> > >> > I´m using autocompleter tag with Struts 2.0.8 and I need to show a >> > default >> > value to the user. >> > >> > For example, in the JSON list : >> > >> > [ >> > ["Alabama","AL"], >> > ["Alaska","AK"], >> > ["American Samoa","AS"], >> > ... >> > >> > I need to show by default 'AS(id) - American Samoa' . How I do this ? >> > >> > >> > Herrera >> > >> > >> > -- >> > View this message in context: >> > >> http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11556982 >> > Sent from the Struts - User mailing list archive at Nabble.com. >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > > -- View this message in context: http://www.nabble.com/-S2--autocompleter%2C-predefining-initial-value-tf4067166.html#a11576447 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]