Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Auto suggestion form database" Watch "Auto suggestion form database" New topic
Author

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.


Merrill
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Auto suggestion form database
 
Similar Threads
Display Check Boxes & Dropdowns in Struts with search results
Opening excel sheet separately
display data on first jsp on start of application
JSP to Excel - beginner
Display Check Boxes & Dropdowns in Struts with search results