This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes retrieve data from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "retrieve data from database" Watch "retrieve data from database" New topic
Author

retrieve data from database

Gopu Akraju
Ranch Hand

Joined: Jan 13, 2008
Posts: 242
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: retrieve data from database
 
Similar Threads
Displaying values in the datatable!
show and insert data from list depending on choice of radio button
How to display retrivied users from the Datase into Drop-down menu using servlet+JSP(JSTL)
Can I add JSF components through Ajax?
accessing database using javascript