• 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

Populate a SelectOneMenu and others

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i, i'm here to ask to you something to my "web project"..

i'm italian so sorry for my english!

I'm using JSF and Hibernate for the database... i create POJO and DAO classes from database and do a .xhml page with the information that the user have to write like this:





now the user must select an item from a selectonemenu, a drop down list, and the items are the records of a database table.. For example the table of my region's cities. I don't want to write one by one the items, because this table change his records many times!
what i can do to have all the cities in this selectonemenu? someone have the code to have a list and where i have to write this code? in DAO class?

SECOND PROBLEM:





to explain i post this photo:


when the user click on the button "Aggiungi membro alla compagine", the strings that he write in the inputText have to be displayed in the table on the top of the image, and the inputText elements have to be ready for another input. This is not a page, this is a part of a bigger .xhtml and i need that the user do this operation in the same page..

Thanks a lot for your answers
reply
    Bookmark Topic Watch Topic
  • New Topic