Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populate a SelectOneMenu and others

Vito Lobefaro
Posts: 1
  • Mark post as helpful
  • send pies
  • 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?


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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic