Hello,
"
This is probably simple to do, but for some reason the concept is escaping my brain!! We have a table ("TABLE1") containing, among other things, a column ("COUNTRY_ID") of values in a number format that are inserted into the column from values in a lookup table (list of countries, say "COUNTRIES") of the same Oracle database. Any values being persisted to the database have to correspond to the ID associated with the country selected. However, in a primefaces form we have a field that contains a drop down list of countries that users can choose. Those countries have to appear in their text format on the form (the aforementioned "COUNTRIES" lookup table has a column containing the country names in text "COUNTRY_CODE_DESC", corresponding, of course, to an ID value for each country "COUNTRY_ID"). I am struggling to first of all set any fields in the form that display the country name to a default name (rather than it's associated ID), and at the same time having difficulty getting the same selected country name in it's text format "converted" to it's associated ID so I can persist that ID to the "COUNTRY_ID" column of the table "TABLE1". In essence, text value in form and corresponding ID value in database. I should know this, but as noted, I am struggling with how it should work. I am developing this in
java 1.7, using JPA 2.1 and on a
JBoss EAP 6.21 server, accessing an Oracle 11 database.
Thank you!