aspose file tools*
The moose likes JSF and the fly likes Help with selectOneMenu items Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Help with selectOneMenu items" Watch "Help with selectOneMenu items" New topic
Author

Help with selectOneMenu items

Ginni Machamer
Greenhorn

Joined: Aug 18, 2009
Posts: 3
Hi,

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!!

Ginni
 
wood burning stoves
 
subject: Help with selectOneMenu items