Hello,

We needed to do a simular thing in our project.  We are using facelets
in our project, which made it very easy.
We got it working like this:

productList.xhtml

<ui:component
  xmlns="http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml> "
  xmlns:h="http://java.sun.com/jsf/html <http://java.sun.com/jsf/html> "
  xmlns:ui="http://java.sun.com/jsf/facelets
<http://java.sun.com/jsf/facelets> ">

  <ui:repeat var="product" value="#{productBean.products}" >
    <ui:include src="./component/productDetails.xhtml"> 
      <ui:param name="product" value="#{product}"/>
    </ui:include>
  </ui:repeat>

</ui:component>



productDetails.xhtml:

<ui:component
  xmlns="http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml> "
  xmlns:h="http://java.sun.com/jsf/html <http://java.sun.com/jsf/html> "
  xmlns:ui="http://java.sun.com/jsf/facelets
<http://java.sun.com/jsf/facelets> ">  

  <div>
    <h2><h:outputText value="#{product.name}" /></h2>
    <h:outputText value="#{product.description}" />
  </div>

</ui:component>



With kind regards,
    Marco Beelen

 
 


-----Original Message-----
From: legolas [mailto:[EMAIL PROTECTED]
Sent: zaterdag 6 januari 2007 18:26
To: users@myfaces.apache.org
Subject: what is the solution to show some records in none tabular
format?


Hi
Thank you for reading my post

imagine that you have to show some number of records from a database but
not
in tabular format.
I should show each company in its panel, i do not know how much items i
have
to show each time.
the solution that i thought is what i used in Struts (i think) it is
like:

I thought that i create a template page to show each record information
then
include this page in main page inside a loop as many times as my records
set
has more records.
In each loop iteration, i pass comany details as a Map/array to page
fragment.


is it a good solution for this problem or i should check for something
else,
is there such feature in jsf or it was just in Struts?

thanks
--
View this message in context:
http://www.nabble.com/what-is-the-solution-to-show-some-records-in-none-
tabular-format--tf2931613.html#a8196225
Sent from the MyFaces - Users mailing list archive at Nabble.com.





------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is 
available at http://www.merck.com/contact/contacts.html) that may be 
confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this 
message. If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then 
delete it from your system.

------------------------------------------------------------------------------

Reply via email to