Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with selectOneMenu items  RSS feed

Ginni Machamer
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a page that is used to display a form. It may be used so the user can submit a new (blank) form or for the user to update an existing form's data.

My backing bean (using Seam 2.2.1 and Rich Faces 3) has the object that I can see when I step through the debugger. It has an object attribute that I can also see is properly getting set. My selectOneMenu looks like this:

I can see in the debugger that the libRequest.itemSourceType is there. But when the page comes up, it is not selected in the field. The field shows the first item in the list as being selected, which is a bogus option "-Select-".

My data is from a legacy database and the primary key for the itemSourceType is actually a string value. Could that be causing the problem?

I have another selectOneMenu item on the page, whose ID is a Long, and that one properly displays the actual selected value from the database.

I would appreciate any insight on this. Thanks!!

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!