• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

retrieve data from database

 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a very simple JSF application with hibernate. I get values from the user through the above said application and used hibernate mapping files to save data into database and it works fine till that.

In the initial set up, I have a drop down list which I had configured through faces-config.xml file as key and value of a hashmap. I could get the drop down menu and allow the user to select this value and get it as bean and finally saving into database.

Now I would like to add some more features. I would like to get the list (one of the column) from a table(list_table) in the database and display for the users in the web page. How do I achieve this?

1. Do I have to add one more hbm file according to list_table?
2. Then use a separate java class (list.java) with beans ( for the column name as list_table with getter and setter method) and call $list.column name) in my jsf page to display the list for the users.

I haven't tried this and I want to know how to proceed further.

Basically I want to read one column from a table and display as a list in my jsf page. Please give some suggestions.
Regards
 
reply
    Bookmark Topic Watch Topic
  • New Topic