5 Replies Latest reply on Jan 8, 2009 10:28 PM by Val Sw

    Implementing framework entity query in components.xml question, suggestion reqd

    Val Sw Expert
      Hi,

      I am trying to implement framework entity query in components.xml first time. Need some information...

      I have an entity "Project", seam gen created corresponding ProjectList.java which extends EntityQuery.

      a) If we usign "framework:entity-query" then I cannot not use ProjectList.java ?? else I get "Two components with the same name and precedence " exception....

      b) I tried testing a simple query to components.xml (removed ProjectList.java generated by seam),
      when I try to access page it gives the error as mentioned below:

      I am sure I am missing some configuration... please suggest.

      Error :
      -------
      javax.servlet.ServletException: Property 'project' not found on type org.jboss.seam.framework.EntityQuery_$$_javassist_5
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      Components.xml:
      ---------------
      <framework:entity-query name="projectList"
        ejbql="select project from Project project" scope="conversation">
        <framework:hints>
        <key>org.hibernate.comment</key>
        <value>Query for projects as result of search on /ProjectList.xhtml</value>
        </framework:hints>

        <framework:restrictions>
        <value>project.hjid=7</value>
        </framework:restrictions>

      </framework:entity-query>

      ProjectList.xhtml
      -----------------
      <rich:dataTable id="projectList"
        var="project"  value="#{projectList.resultList}"
         rendered="#{not empty projectList.resultList}">

      <h:column>
      #{project.projectName}
      </h:column>
      ... etc..