0 Replies Latest reply on Aug 24, 2007 6:48 AM by Thiagu Mariappan

    Is it possible to remove dataTable colum dynamically

    Thiagu Mariappan Novice

      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
      
      

      i need to display the all products information under one category at a time.
      The datatable should be column wise and completely dynamic
      if i am going to display the car category i have two list for display the dataTable
      one from Table_products and another one from Table_Car

      this is my view part
      <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>
      

      the DB have two entries in Table_car. so the dataTable shows three columens . one for showing properties and another two for dispaly two different entries in the DB.

      here when i click remove link on any column i need to remove that particular column. i dont know how to do this
      it is possible in Richface

      please anyone help me

      Sorry for the duplicate post. i mistakenly post this question in Ajax developer forum ,sorry again.

      by
      thiagu.m