0 Replies Latest reply on Jan 4, 2008 1:03 AM by pointer

    dataGrid and effect problem

    pointer

      Hi everybody.

      Happy new year!

      Here, I met one problem.I have one datagrid component in the page, each item in the datagrid is a richpanel, and adding a commend link into the richpanel to control the data delete.

      It works fine. Now I want to add effect component to each item panel, when click the link the effect begin working.

      My problem is that now the effect component can only works for the last item. Code is as below.

      <a4j:form ajaxSubmit="true">
       <a4j:keepAlive beanName="subRestaurantList" />
       <rich:datascroller for="subRestaurantList" maxPages="5" render="#{subRestaurantList.dataModel.rowCount > 20 }" binding="#{subRestaurantList.datascroller}" boundaryControls="show" />
       <rich:dataGrid id="subRestaurantList" value="#{subRestaurantList.dataModel}" var="item" columns="2" elements="8" first="0">
       <rich:panel id="infoPanel" style="width:270px">
       <f:facet name="header">
       <h:outputText value="#{item.name}"></h:outputText>
       </f:facet>
       <a4j:commandLink id="delete" onclick="deleteInfo({duration:0.8})">
       <h:outputText value="Delete" />
       </a4j:commandLink>
       <rich:effect name="deleteInfo" for="infoPanel" type="DropOut" />
       <h:panelGrid columns="2">
       <h:outputText value="Price:" styleClass="label"></h:outputText>
       <h:outputText value="#{item.service}" />
       </h:panelGrid>
       </rich:panel>
       </rich:dataGrid>
       </a4j:form>
      

      I know that this problem is cacused by the richpanel id. Is there any way to dynamic assign the id to the richpanel, or make all effect works.

      Thank you very much!