wood burning stoves 2.0*
The moose likes Struts and the fly likes how to implement an auto-suggest feature with Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to implement an auto-suggest feature with Struts" Watch "how to implement an auto-suggest feature with Struts" New topic
Author

how to implement an auto-suggest feature with Struts

sumita mukherjee
Greenhorn

Joined: Aug 27, 2007
Posts: 22
Hi,

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.

Thanks,
~S
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
AJAX, try google suggest.
sumita mukherjee
Greenhorn

Joined: Aug 27, 2007
Posts: 22
I searched the net and found that there is a suggest Class that helps in creating autusuggest in struts.

http://struts.application-servers.com/suggest/index.html

Will this help me? I am not so experienced at this stage to evaluate its advantages and disadvantages. Please advise.

Regards,
~S
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
It's important to understand that the above class is part of Struts Layout which is a Struts add-on. In order to use it, you must download and install Struts Layout.


Merrill
Consultant, Sima Solutions
 
 
subject: how to implement an auto-suggest feature with Struts