1 Reply Latest reply on Dec 19, 2006 10:06 AM by Gavin King

    Cannot retrive data from session query to jsp (component not

    Richard Rusinkiewicz Newbie

      I have the following code in my jsp :

      <h:form id="list">
      <h:outputText value="No records to display" rendered="#{list.rowCount==0}"/>
      <h:dataTable var="rec" value="#{list}" rendered="#{list.rowCount>0}">
      <h:column>
      <f:facet name="header">
      <h:outputText value="Production order id"/>
      </f:facet>
      <h:outputText value="#{rec.T$PDNO}"/>
      </h:column>
      <h:column>
      <f:facet name="header">
      <h:outputText value="Operation id"/>
      </f:facet>
      <h:outputText value="#{rec.T$OPNO}"/>
      </h:column>
      <h:column>
      <f:facet name="header">
      <h:outputText value="Planned"/>
      </f:facet>
      <h:outputText value="#{rec.T$QPLN}"/>
      </h:column>
      <h:column>
      <f:facet name="header">
      <h:outputText value="Completed"/>
      </f:facet>
      <h:outputText value="#{rec.T$QPRD}"/>
      </h:column>
      </h:dataTable>
      </h:form>

      In my session bean I have the following code:

      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.datamodel.DataModel;

      @Name("reportoperationsseambean")
      @Stateful(name="reportoperationsSeam")
      public class ReportOperationsSeamBean implements ReportOperationsSeam,ReportOperationsSeamLocal {
      @PersistenceContext
      (
      unitName="reportoperationsSeam",
      type=PersistenceContextType.EXTENDED
      )
      protected EntityManager em;
      @In
      private Ttisfc010 ttisfc010;
      @DataModel
      private List<Ttisfc010> list;
      @DataModel
      private Ttisfc010 recordTtisfc010;
      @DataModel
      private Ttisfc001 recordTtisfc001;
      @DataModel
      private Ttihra100 recordTtihra100;
      @DataModel private Tticst002 recordTticst002;

      public ReportOperationsSeamBean() {
      }
      @Factory(value="list",scope=ScopeType.CONVERSATION)
      public void getTtisfc010(int startRecord) {
      String query="select * from Ttisfc010906";
      Query q = em.createNativeQuery(query,Ttisfc010.class);
      q.setFirstResult(startRecord);
      q.setMaxResults(100);
      list= q.getResultList();
      }

      And my components.xml looks as follows:

      <components xmlns="http://jboss.com/products/seam/components"
      xmlns:core="http://jboss.com/products/seam/core">
      <core:init jndi-name="roc-web-seam/#{reportoperationsSeam}/local"/>


      From the jboss log file I can see that component list is not found.