It's not a secret anymore!*
The moose likes Struts and the fly likes html:select button in struts?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:select button in struts??" Watch "html:select button in struts??" New topic
Author

html:select button in struts??

divya chamarti
Ranch Hand

Joined: Jul 28, 2006
Posts: 56
please any body tell me how to print the value in select drop-up box
dynamically means by using <bean:iterate and <bean:write tag by using the values stored in a java class file that is Form bean class not by using directly provided value in jsp page in which the form is created like :
<html:select property="selectItems" size="1">
<b>Charging Type : </b>
<html ption value="High">High</html ption>
<html ption value="Medium">Medium</html ption>
<html ption value="Low">Low</html ption>
</html:select>
i want to do it by using bean tag library dynamically
please tell me how to do it or tell me some usefull link to do this
RoshaniG Gopal
Ranch Hand

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

I think this should solve your problem. If not let me know.
http://www.coderanch.com/t/54560/Struts/help-please

Regards,
Roshani


Regards,<br />Roshani
divya chamarti
Ranch Hand

Joined: Jul 28, 2006
Posts: 56
Hi Roshani
Thanks a lot for your suggestion but this is applicable only for a single select button--------combo dropdown list , but actually what i want that is there are so many countries-list in the combo dropdown list below that there is another combo dropdown list which shows coresspondingly state list according to the country selected(that will be server side selection b'coz we are not submitting the form----so i think there will be a javascript function which will just pick the value selected from country list and , there wil be a list of resouce files for every contry with the list of states , then it will pick the corresponding resource file and will show the state-list in 2'nd one combo dropdown list for the states for the country selected------ so can you provide me atleast the javascript function which will pick up the selected country-list???
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi Divya,
From what i comprehend you require a double combo box (second combo based on first combo).
You may use Javascript/ajax for that. I am trying to use Ajax for the same, and by end of day i think i should be able to do it. I will send you the code if i am able to do so. I dont have the JS function by the way.
While if you wish you may go through the following link.
http://www.it-eye.nl/weblog/2005/12/13/ajax-in-struts-implementing-dependend-select-boxes/.

Regards,
Roshani
divya chamarti
Ranch Hand

Joined: Jul 28, 2006
Posts: 56
Hi Roshani
did you get the solution?
i tried that but i didn't get that one
please help me
regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:select button in struts??