I have implemented a struts 2 autocompleter in which i have used a list of String like this -
How can I set a default value for this, so that every time it loads, a default value will be shown ?
Best How To :
You should use the
value attribute as suggested by @Choatech:
value false false String "Preset the value of input element."
The value specified, however, should be one of the keys listed in your
cityList, not some random value.
If the value you want to use is an header one, like
Please choose a City..., then consider using the