[jboss-user] [JBoss Seam] - Re: Retrieving data from database

alexrozario do-not-reply at jboss.com
Thu Jun 28 00:54:26 EDT 2007


"alexrozario" wrote : 
  | how to view(display) that details in my view page..
  | 
  | i am using facelet file to view that data.
  | 
  | and this is my session bean class which retrieving data
  | 
  | @Stateless
  |   | @Name("searchsession")
  |   | public class SearchSession implements SearchLocal 
  |   | {
  |   |    @Out
  |   |    private List details;
  |   |    
  |   |    public String search() 
  |   |   {
  |   |       details =em.createQuery("select s.storeName,s.reviewPoints,s.website from Stores s").getResultList();
  |   |       System.out.println("list : "+details);
  |   |       return "query";
  |   |   }
  |   | }
  |   | 
  | and my facelet file contains,
  | 
  | <rich:dataTable width="483" id="details" rows="10" columnClasses="col" value="#{details}" var="val">
  |   |            <h:column>
  |   | 		<h:outputText value="#{val.storeName}" />
  |   | 	</h:column>
  |   | 	<h:column>
  |   | 		<h:outputText value="#{val.reviewpoints}" />
  |   | 	</h:column>
  |   | 	<h:column>
  |   | 		<h:outputText value="#{val.website}" />
  |   | 	</h:column>
  |   | </rich:dataTable>
  |   | 
  | now help me to view them in my facelet file..
  | thank you

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058530#4058530

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058530



More information about the jboss-user mailing list