aspose file tools*
The moose likes JSF and the fly likes populate dropdown list from table of database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "populate dropdown list from table of database" Watch "populate dropdown list from table of database" New topic
Author

populate dropdown list from table of database

sameera srimal
Greenhorn

Joined: Nov 05, 2009
Posts: 7
can somebody to help me to
know, how can a drop down list to populate its items from table of database automatically (in page loading stage) in JSF page.

Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 79

Change your link to commandLink pointing to a method in some backing bean. There you can call the current backing bean of the loaded page getting it from the FacesContext and fill it with any data you need. Example:

start page:
nav rules and bean mappings in faces config:
org.mypackage.MyController:

Hope this helps...


Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
willCodeForFood("Java,PHP,C#,XML,VBS,XHTML,CSS,JavaScript,SQL"); //always looking for job opportunities in AU/NZ/US/CA/Europe :P
sameera srimal
Greenhorn

Joined: Nov 05, 2009
Posts: 7

ya thank for your assistance it help me to learn and to find the answer i expected
thanks again !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: populate dropdown list from table of database