I am trying to implement an auto suggest feaure, so that when user types a word in a text box, pressing the "spacebar" takes the word to the backend, where we have a logic to bring suggestion sentences.
I guess I have to put some kind of action mapping when user presses spacebar so that the word is passed to my parser to fetch the suggested topics matching this. I have the matching and parser layer so that might ebe treated as a black box, taking a word and giving back an arraylist of sentences.
Later when the suggested sentences come back, I have to show it in a dropdown menu, so that user can choose a sentence/topic from the list. The development of this feature is at a very nascent stage, and I am also very new to Struts. So any guidance for the implementation would be of great help.