dcsimg
Select Lists in struts
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Laura_Matei
Posted On:   Tuesday, May 10, 2005 05:53 PM

Hello! How can I do with struts when choosing an option from a select list, to change the options on another select list on the same page. For example: I have a list of event domains (culture, entertainment) and for each domain I have a list of categories (culture with theatre, opera,films and entertainment with parties, shows, concerts). I defined the event domain list in the class EventForm.java as an arrayList. I don't know how to define the lists for the event categories such that when choosing a domain in the form automaticaly to display the corresponding categories. I give you the example for my first option list as I call it in the JSP: And after I do this   More>>

Hello! How can I do with struts when choosing an option from a select list, to change the options on another select list on the same page. For example: I have a list of event domains (culture, entertainment) and for each domain I have a list of categories (culture with theatre, opera,films and entertainment with parties, shows, concerts).

I defined the event domain list in the class EventForm.java as an arrayList. I don't
know how to define the lists for the event categories such that when choosing a domain in the form automaticaly to display the corresponding categories.

I give you the example for my first option list as I call it in the JSP:







And after I do this I need when choosing the eventDomain the coresponding
Categories to be listed in a "select-option" list
Please if you have an example it would help a lot!
Thank you!
Laura

   <<Less

Re: Select Lists in struts

Posted By:   Anonymous  
Posted On:   Friday, May 13, 2005 05:36 AM

Hi Laura,
You need to submit the form when the drop down changes.
So just call the javascript function which will submit the data on the onchange event of the drop down box and call another method in the action which will retrive the specific records.
This will solve your problem .
Let me know if there are any problems.
Bye
Apratim
About | Sitemap | Contact