Re: Combination of dataTable and popupPanel
dandii Jan 28, 2011 3:28 AMHi 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}" > <rich:column> <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> </rich:column> <!-- other columns --> <rich:column style="width:20px;text-align:center"> <f:facet name="header"> </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" /> </f:facet> <h:outputText value="Do you really want to delete this entity?" /> <br /> <h:outputText value="ID: #{entity.id}" /> <br /> <div class="actionButtons"> <h:form> <h:button id="cancel" value="#{messages.cancel}" outcome="/entity/entityList" /> <a4j:commandButton id="deleteButton" value="#{messages.delete}" action="#{runHome.remove(entity.id, '/entity/entityList')}" /> </h:form> </div> </rich:popupPanel> </h:commandLink> </rich:column> </rich:dataTable> </div> </a4j:outputPanel> </rich:panel> </h:panelGroup> </h:form>