af:autosuggestBehavior – intro

This component in adf is used to provide a declarative way of providing suggestions for adf input components
the three main attributes aresuggestItems – mapped to a bean which returns List of SelectItems.maxSuggestedItems – number of suggestedItems. -1 will fetch everything from the server. if the number is limited then a more link is displayed to fetch remaining items from the serversmartList – this list is added to show intial result. then the entire result from the server is fetched if no operation is done by the user

problem: I have a destination inputText which takes city/state combination. I want to implement an autosuggestbehavior for the inputText. When I enter more than three character the suggestion box should appear which City/States.

1) create an af:inputText, the value of the inputText is mapped to a managedBean to store the value that is entered by the user

2) now add an af:autosuggestbehavior tag to the inputText. This takes two attribute values. suggestItems and maxSuggestItems. provide maxSuggestItems as ‘5’ to display 5 values. suggestItems is bounded to the managedbean with a method ‘destination’ which returns a List of SelectItems.

Thanks for replying. My need is that the autosuggest triggers only when more than 3 characters are entered. When the user enters less than 3 characters, nothing should happen (I don’t want to see the No results found message). But I don’t think that it is possible… Please advise?