1 Reply Latest reply on Jun 1, 2007 5:52 AM by Francis LIMOUSY

    Wrong datatable var type

    Francis LIMOUSY Newbie

      Hello,

      I used the clickable list example described in chapter 1.3 in the reference guide to create my own list page, but I have some:

      javax.faces.el.PropertyNotFoundException

      when I try to display the datatable

      The weird thing is that the same Object is in the DataModel and in the "var" of my datatable:

      certif com.fitnetapplication.certifications.entity.CertificationList@1faa588
      certificationList com.fitnetapplication.certifications.entity.CertificationList@1faa588
      


      (This comes from the debug page)

      Here is my bean code :

      @Stateless
      @Name("myCertifications")
      public class MyCertificationsBean implements MyCertifications {
      
       @Logger private Log log;
      
       @In FacesMessages facesMessages;
      
       @DataModel
       private List<Certification> certificationList;
      
       @DataModelSelection
       @Out(required=false)
       private Certification certification;
      
       @In(value="entityManager")
       private EntityManager em;
      
       @In(value="loggedCollaborateur", required=false, create=true)
       Collaborateur loggedCollaborateur;
      
       @Factory("certificationList")
       public void findMessages()
       {
      
      (...) blablabla, I'm fetching all my list (...)
      
       }
      


      My page :

       <h:dataTable id="certificationList"
       var="certif"
       value="#{certificationList}" >
       <h:column>
       <f:facet name="header">
       <s:link styleClass="columnHeader"
       value="certificationId #{certificationList.order=='certificationId asc' ? messages.down : ( certificationList.order=='certificationId desc' ? messages.up : '' )}">
       <f:param name="order" value="#{certificationList.order=='certificationId asc' ? 'certificationId desc' : 'certificationId asc'}"/>
       </s:link>
       </f:facet>
       <h:outputText value="#{certif.certificationId}"></h:outputText>
       </h:column>
      
      etc (...)
      


      I also tried with a rich:datatable but it didn't change.

      What am I doing wring here ?
      Why isn't there any "Certification" objects in my "certif" var in the jsf page ?