• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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???
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
divya chamarti
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ,
 
knowledge is the difference between drudgery and strategic action -- tiny ad
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic