hai everyone
this is my table structure
Table_Products product_category property cell phone messaging cell phone camera icell phone Entertainment Car fuel Car price Table_car id fuel price m55 petrol 35000 c56 diesel 50000 Table_Cellphone id messaging camera Entertainment 2288 sms video capture FM 4466 email zoom camera games
<rich:dataTable var="product" value="#{table_products_list}"> <f:facet name="header"> <rich:columnGroup> <rich:column> <h:outputText value="property" /> </rich:column> <c:forEach items="#{car_list}" var="car"> <rich:column> <h:panelGroup> <h:outputText value="#{car .id}"/> <h:commandLink value="Remove" action="#{bean.removeColumn}" /> </h:panelGroup> </rich:column> </c:forEach> </rich:columnGroup> </f:facet> <rich:column> <h:outputText value="#{product.property}" /> </rich:column> <c:forEach items="#{car_list}" var="car"> <rich:column> <h:outputText value="#{car.returnValue(product.property)}"/> </rich:column> </c:forEach> </rich:dataTable>