• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts combobox loading

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to load combobox with values from database. So when the jsp page loads , the combox should have values from database.

can anyone help me in this
[ August 12, 2008: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Create a Form Bean with a String[] as a property. Map the Bean to the FORM on the page in the struts-config.xml . From the Action class populate the String[] with values from the database. Struts should take care of the remainder and you should be able to see the values in the drop down.

Cheers,
Raj.
 
subhanair girish
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have written the code like this,
actionclass
------------

biometricdata.jsp
--------------------

biometricdataform.java


kindly help me in this.
 
reply
    Bookmark Topic Watch Topic
  • New Topic