2 Replies Latest reply on Nov 12, 2007 6:37 PM by sztank

    s:selectItems, entity-query, convertEntity stop working

    sztank

      Hello,
      When I migrate from seam 1.2 to 2.0 the following code stops to work properly:

      View:

      ..
      <s:decorate id="clientDecorate" template="layout/edit.xhtml">
       <ui:define name="label">Client:</ui:define>
       <h:selectOneMenu value="#{contract.client}" required="true">
       <s:selectItems value="#{clients.resultList}" var="c" label="#{c.name}" noSelectionLabel="Not defined"/>
       <s:convertEntity />
       </h:selectOneMenu>
      </s:decorate>
      ..
      


      where "clients" is the entity-query defined in components.xml file:
      <framework:entity-query name="clients" ejbql="select b from Client b" />
      


      "contract" is the entity bean.
      That work perfectly in seam 1.2. In seam 2.0 it behaves this way:
      When the view is rendered the selectOneMenu is always set to "Not defined" even when the contract.client field is set. So for example when I filled the form and select some "client" from selectOneMenu and then post the form the proper value is set to contract.client field. I persist the contract entity to the database. Now when the enother (edit) form is displayed with the contract.client set the label is "Not defined"

      I have read some posts that deal with s:selectItems migration problems but still can't solve the problem.
      Thanks in advance for any help.