4 Replies Latest reply on Jan 28, 2011 3:27 AM by Andi D

    Re: Combination of dataTable and popupPanel

    Andi D Newbie

      Hi Ilya,


      thanks for your reply!

      At the moment I'm one step further:

      I can reach the popupPanel with the correct entity (the ouputext shows the correct ID!),

      my Problem now is that the commandButton (id="deleteButton") does not work!


      <h:form id="listForm">
           <h:panelGroup id="searchResults">
                <rich:panel id="richPanel">
                     <f:facet name="header">List</f:facet>
                     <a4j:outputPanel id="outPanel">
                          <div class="results" id="entityList">
                               <rich:dataTable id="dataTable" var="entity"
                                     value="#{entityList.resultList}" >
                                         <f:facet name="header">#{messages.id}</f:facet>
                                         <h:link id="idLink" value="#{entity.id}" outcome="/entity/entity">
                                         <f:param name="entityIdd" value="#{entity.id}" />                                   </h:link>
                                    <!-- other columns -->
                                    <rich:column style="width:20px;text-align:center">
                                         <f:facet name="header">&#160;</f:facet>
                                         <h:commandLink id="delete" action="#{fileUploadHome.remove(entity.id)}" render="outPanel">
                                              <h:graphicImage name="img/delete.gif" alt="Delete" style="border:0px" />
                                              <rich:componentControl target="popup" operation="show"  />
          <rich:componentControl target="popup" operation="show" />
          <rich:popupPanel id="popup" height="100" width="300" resizeable="false">
              <f:facet name="header">
                  <h:outputText value="Some Text" />
              <h:outputText value="Do you really want to delete this entity?" />
              <br />
              <h:outputText value="ID: #{entity.id}" />
              <br />
              <div class="actionButtons">
                      <h:button id="cancel" value="#{messages.cancel}" outcome="/entity/entityList" />
                      <a4j:commandButton id="deleteButton" value="#{messages.delete}" action="#{runHome.remove(entity.id, '/entity/entityList')}" />