1 Reply Latest reply on Apr 26, 2011 12:01 AM by Aldo Bonzi

    Help mapping selectOneMenu to selected value

    ginni machamer Newbie

      I have a form in a xhtml page that displays parent and child data.  A publication type (book, e.g.) has multiple requests. Simple. My backing bean loads the request and I can see in the debugger that the publication type is there.  In the page, I have a selectOneMenu that is bound (value) to


      #{libRequest.publicationType}



      and its select items is bound to a


      List<SelectItem> pubTypes



      .  When I load an existing record, if it has a pubType selected, it is correctly displayed as such.


      I copied this pattern for another type of association. Item source type (vendor, e.g.) has many requests.  Again, I bound the selectOneMenu to the


      #{libRequest.sourceType}



      and the select items to the backing bean


      List<ItemSourceType>



      The types show up in the list correctly, but the type specified in the request (which I can see clearly is there in debugger) is not selected.


      I cannot figure out why the binding is working for one but not the other.


      Ideas?