aspose file tools*
The moose likes Struts and the fly likes populate a combo drop down box by using the values defined in a resource file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "populate a combo drop down box by using the values defined in a resource file" Watch "populate a combo drop down box by using the values defined in a resource file" New topic
Author

populate a combo drop down box by using the values defined in a resource file

divya chamarti
Ranch Hand

Joined: Jul 28, 2006
Posts: 56
can any body help me to tell how to populate a combo drop down box by using the values defined in a resource file under \classes folder in struts???
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi,
you may do it as follows:

<html:select property="location" styleClass="small">
<html ption value="0">
<bean:message key="feature.admin.option.value"/>
</html ption>

Regards,
Roshani


Regards,<br />Roshani
divya chamarti
Ranch Hand

Joined: Jul 28, 2006
Posts: 56
thanks roshani
but i think it will work 4 only one option but there is suppose 5 options i mean the options i want to iterate more than 1 times and the values must be from the resource file itself
regards
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi divya,
Please try it and i think it should work. All the values will come from the resource file only. You may use it as in the <html:select>.
<html ption value="0">
<bean:message key="feature.admin.option1.value"/>
</html ption
<html ption value="0">
<bean:message key="feature.admin.option2.value"/>
</html ption>

Do you want to use <bean:iterate> ???
Incase it doesnt please let me know the exact problem that you are facing.
Regards,
Roshani
divya chamarti
Ranch Hand

Joined: Jul 28, 2006
Posts: 56
Hi Roshani
exacly i want to use <logic:iterate tag for populating the combo box instead of writing the multiple <html ption tag for multiple values
and the values should come from the resource file itself
if you can tell me please tell me i'm waiting for your response
regards ,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: populate a combo drop down box by using the values defined in a resource file
 
Similar Threads
delete from slecet box
populating drop down box
populate list box from resource bundle
How to populate drop down box
Javascript on html with file object