I have a doubt in struts can you please help me out in this.
I have two list boxes. If i select one item from first list box the page should get refreshed and display the associated item in the second list box. It is very urgent. Would anybody please help me out. Thanks in Advance.
Then you disable the second drop down until an option is picked from the first. You watch for a onChange() for the first drop down, then repopulate the second (and enable if disabled).
BTW, cars.com does this, so you can look at the page source there to get some ideas.
I would suggest you a simple solution for this. But it will work only if javaScriot is enabled in a webBrowser
In the JSP file, add onChange event handler for the first combobox.
if the list value is changed then the function this time you will have to disable the second listbox
This form would get submitted to the action class which is configure in struts-config.xml. In that action class retrieve the request parametr of the first list box execute the logic to find the vvalues for the second listtbox populate the form-bean and return the control to same JSP. Now you will have the second list box populated with the values based on the first listbox
Hope this helps.
Only those who will risk going too far can possibly find out how far one can go !!!