1 Reply Latest reply on Aug 24, 2008 6:56 PM by Andrew Fritz

    Another s:convertEntity random issue

    Andrew Fritz Newbie

      I'm running on JBoss 4.2.2 GA and Seam 2.0.2 SP1

      This is my first attempt to use s:convertEntity in a brand new project. It has worked in other projects, but they were Seam 1.2.

      I'm using s:selectItems and s:convertEntity to allow the user to pick a client (Client is an entity and has overridden equals and hashcode).

      Everything uses the @In injected Entity Manager named entityManager from JPA. I've tried it with and without the components.xml entry to explicitly tell the entity converter the name of the entity manager.

      My JSF code is:

      <h:selectOneMenu value="#{userBean.user.client}">
           <s:selectItems value="#{userBean.clients}" var="client" 
                  label="#{client.name}" noSelectionLabel="Please Select..."/>

      When the form is submitted via a command button I get the following exception:

      javax.el.PropertyNotFoundException: Property 'client' not found on type org.javassist.tmp.java.lang.Object_$$_javassist_2
           at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
           at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
           at javax.el.BeanELResolver.property(BeanELResolver.java:279)
           at javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
           at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
           at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)....

      The property client exists on the target object User and has a public setter and getter. I've followed various other threads about problems with s:convertEntity but none of those suggestions seem to help. I've tried many other variations of the faces code just to make sure there wasn't something strange there...

      I'm willing to concede that maybe this is a typo or something, but I can't see it and I've been messing with this for like 4 hours. It is driving me crazy. I created the entire rest of the user/role editing system in under 2 hours.

      Any help or suggestions would be appreciated.