6 Replies Latest reply on Jul 2, 2007 6:37 AM by Pete Muir

    HELP : displaying data retrieved from DB

    alex rozario Newbie

      i am creating project in the following environment
      facelet+jsf+seam+ejb+oracle in jboss server . well its progressing fine.
      but while using datatable i stuck with an issue.
      i cant display data in datatable
      please help me to overcome it.
      if my coding is wrong please correct me.
      my coding for the particular datatable as follows,

      my java file is, Code:

      public class SearchSession implements SearchLocal {
       private List details;
       private EntityManager em;
       public String search() {
       long productid = 101;
       details = em.createQuery("select s from Stores s").getResultList();
       return "query";

      this keyword query forwards to the next page shown below,
      and my facelet(.xhtml) file is Code:

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      <rich:dataTable width="483" id="details" rows="10" columnClasses="col" value="#{details}" var="val">
       <h:outputText value="#{val.storeName}" />
       <h:outputText value="#{val.website}" />

      ofcourse my code has some more fields and some more details.
      but while running this application, i have checked that the select query retrieves data from table. but it doesn't displays it in datatable.

      whats wrong in my coding
      help me to overcome this issue.