aspose file tools*
The moose likes Struts and the fly likes drop downs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "drop downs" Watch "drop downs" New topic
Author

drop downs

Anil Verghese
Ranch Hand

Joined: Oct 11, 2006
Posts: 155
hii guyzz..

I 'v got two drop downs in my jsp page, when this page is loaded first loaded the first drop down must be populated and when the user selects something the second must be filled...

how can i do this using struts, i did it by adding my jdbc connection code in my jsp page itself is there a way to do it in a pure mvc2 way...
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi Anil,

You may use Ajax for the same. You will find plenty of examples for the same. It is one typical case for Ajax application.


Regards,<br />Roshani
Mattia Merenda
Ranch Hand

Joined: Dec 14, 2006
Posts: 47
Hi Anil,
I had your same problems.
In this link there is a topic that I posted and it should help for your first problem.
The second link should help for the second drop down list.

http://www.coderanch.com/t/55333/Struts/html-select-html-options

http://www.coderanch.com/t/55440/Struts/Value-returned-select-tag
Mattia Merenda
Ranch Hand

Joined: Dec 14, 2006
Posts: 47
Hi Anil,
I had your same problems.
In this link there is a topic that I posted and it should help for your first problem.
The second link should help for the second drop down list.

http://www.coderanch.com/t/55333/Struts/html-select-html-options

http://www.coderanch.com/t/55440/Struts/Value-returned-select-tag
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Also see this current thread:
http://www.coderanch.com/t/55460/Struts/Shoud-window-location-replace-Struts

- Brent
 
Consider Paul's rocket mass heater.
 
subject: drop downs
 
Similar Threads
How do i maintain the value in a drop down when back button is hit
How to avoid an action form to be in session
Drop down in jsp
How can code the selected value in the JSP
How to retain the selected values in the drop down on submit