3 Replies Latest reply on Oct 16, 2007 11:57 AM by David Spark

    Problem with s:selectItems not showing correct value

    David Spark Newbie

      I have a problem with a h:selectOneMenu using a s:selectItems list. The code is:

      <h:outputText value="#{webUser.clientContact.client.dressCode.maleTop}"/>
      <h:selectOneMenu value="#{webUser.clientContact.client.dressCode.maleTop}">
       <s:selectItems value="#{maleTops.resultList}"
       <s:convertEntity />

      The problem is that when I try and save the value to the database it get's correctly saved in terms of the database structure (i.e. the correct foreign keys) but when I come back to the page the selection list is blank.

      Using the h:outputText in the above code I can see the problem is that the ID's of the entity beans are different between the saved value and the values in the list. I'm wondering if part of the problem is that webUser is session scoped and that maleTops is a framework query defined in components.xml meaning I'm getting 'different' entities back.

      Any help gratefully received :-)