aspose file tools
The moose likes Struts and the fly likes Populating List box in the JSP from Action Class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Populating List box in the JSP from Action Class" Watch "Populating List box in the JSP from Action Class" New topic
Author

Populating List box in the JSP from Action Class

Chinni Bujji
Ranch Hand

Joined: Jan 31, 2007
Posts: 60
Hi,

I am using struts framework

I have a jsp page where i have 3 list boxes in which i need to populate the data on the page load

but i have to populate the data in the second list box after selecting a value in the first list box WITHOUT MAKING A DATABASE CALL.

when i first load the page i need to save the data somewhere
any ideas
i have Business Objects, Transfer Objects,ViewHelpers in my project

where can i implement this logic and how to do it any suggestions please!!!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The term used for this type of control is "dependent dropdown" or "dependent select". If you Google either of these topics, you will find a lot of suggestions about how to do it.

This topic has also been discussed recently in this thread


Merrill
Consultant, Sima Solutions
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
When you say "WITHOUT MAKING A DATABASE CALL" do you really mean "without refreshing the page"? If so, I would recommend an Ajax based solution. As long as your lists are not too large, loading the data into the page and using client-side JavaScript is not too bad of a solution either.

- Brent
Chinni Bujji
Ranch Hand

Joined: Jan 31, 2007
Posts: 60
Yes
One Data Base Call
But i ll refresh the page

but the data is very large

so give me some suggestions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Populating List box in the JSP from Action Class
 
Similar Threads
Using html:select
Dependant drop down list boxes in JSP page
Fire input text event Without Loosing Focus
populate the select when page is displayed first time
Passing values from JSP to JS