File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Auto suggestion form database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Auto suggestion form database" Watch "Auto suggestion form database" New topic

Auto suggestion form database

venkatesh warlu
Ranch Hand

Joined: Mar 11, 2008
Posts: 33
hi guys , i am having a text box in my jsp page. i want to have auto suggestion feature to it . the content as i type in the text box should be taken from database. i am working on struts 1.0 . can anyone help me out in this problem ??

Also one more thing.. i am using a dynamic table in my jsp page which iterates results from database and displays it as a table format. i have a button called "export to excel" in my page. if i click on this button i should be able to retrieve the table content as a excel sheet generated. how do i do this in struts ???

i am a beginner in struts .. so kindly help me out with this issues.. thanking big moose saloon users...
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Originally posted by venkatesh warlu:
how do i do this in struts ???

In order to accomplish this, you will need to spend some time learning AJAX, JavaScript and possibly a JavScript tool kit such as DOJO. While you can create a type-ahead in a Struts project the only thing Struts might possibly provide is an Action that will query the database for a list of suggestions. The rest is all handled in the browser/AJAX layer. This article might be a good place to start.

Consultant, Sima Solutions
venkatesh warlu
Ranch Hand

Joined: Mar 11, 2008
Posts: 33
thanks Merrill Higginson,

thanks for your links. i will surely go through and try solving my issue.
I agree. Here's the link:
subject: Auto suggestion form database
It's not a secret anymore!