2 Replies Latest reply on Nov 10, 2009 12:40 PM by Bruno Santos

    commandButton wihtin modalPanel does not re-render dataTable

    Bruno Santos Newbie

      I'm using Seam 2.2 and RichFaces 3.3.1 and I'm not being able to reRender the dataTable below after a modalPanel requesting for user confirmation. The bean code is executed just fine but a4j reRender never seems to happen. Any ideas?

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:a="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       template="layout/home_base.xhtml">
      
      <ui:define name="action_details">
      
       <h:form>
       <rich:panel id="listEmployeePanel">
       <f:facet name="header">
       <h:outputText value="#{employeeSearchTable.searchProgress}" id="searchProgress"/>
       </f:facet>
      
       <rich:contextMenu attached="false" id="employeePopupMenu" submitMode="ajax">
       <rich:menuItem ajaxSingle="true" action="#{employeeSearchTable.modifySelected}">
       Modify <b>{first} {last}</b> details
       <a:actionparam name="employeeId" value="{employeeId}" assignTo="#{employeeSearchTable.selectedEmployee}"/>
       </rich:menuItem>
       <rich:menuItem ajaxSingle="true" oncomplete="Richfaces.showModalPanel('employeeTableConfirmationPanel');">
       Remove <b>{first} {last}</b> from database
       <a:actionparam name="employeeId" value="{employeeId}" assignTo="#{employeeSearchTable.selectedEmployee}"/>
       </rich:menuItem>
       </rich:contextMenu>
      
       <rich:dataTable value="#{employeeData}" var="employee" id="employeeDetails" rows="25"
       onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur">
       <f:facet name="header">
       <rich:datascroller id="headerEmployeeSearchDataScroller" renderIfSinglePage="false" align="center"
       for="employeeDetails" reRender="footerEmployeeSearchDataScroller"/>
       </f:facet>
       <rich:column>
       <f:facet name="header">
       ID
       </f:facet>
       <h:outputText value="#{employee.employeeId}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       First Name
       </f:facet>
       <h:outputText value="#{employee.firstName}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Middle Name
       </f:facet>
       <h:outputText value="#{employee.middleName}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Last Name
       </f:facet>
       <h:outputText value="#{employee.lastName}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Title
       </f:facet>
       <h:outputText value="#{employee.title}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       E-Mail
       </f:facet>
       <h:outputText value="#{employee.EMail}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Location
       </f:facet>
       <h:outputText value="#{employee.location}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Home Phone
       </f:facet>
       <h:outputText value="#{employee.homePhone}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Cell Phone
       </f:facet>
       <h:outputText value="#{employee.cellPhone}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Company Phone
       </f:facet>
       <h:outputText value="#{employee.companyPhone}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Hired Date
       </f:facet>
       <h:outputText value="#{employee.hiredDate}" />
       </rich:column>
       <rich:column>
       <f:facet name="header">
       Last Update
       </f:facet>
       <h:outputText value="#{employee.lastUpdate}" />
       </rich:column>
       <f:facet name="footer">
       <rich:datascroller id="footerEmployeeSearchDataScroller" renderIfSinglePage="false" align="center"
       for="employeeDetails" reRender="headerEmployeeSearchDataScroller"/>
       </f:facet>
       <rich:componentControl event="onRowClick" for="employeePopupMenu" operation="show">
       <f:param value="#{employee.employeeId}" name="employeeId"/>
       <f:param value="#{employee.firstName}" name="first"/>
       <f:param value="#{employee.lastName}" name="last"/>
       </rich:componentControl>
       </rich:dataTable>
       </rich:panel>
       </h:form>
      
       <rich:modalPanel id="employeeTableConfirmationPanel" width="350" height="100">
       <f:facet name="header">
       <h:outputText value="Please Confirm Employee Removal"></h:outputText>
       </f:facet>
       <f:facet name="controls">
       <h:panelGroup>
       <h:graphicImage value="/images/close.png" id="hidelink"/>
       <rich:componentControl for="confirmationPanel" attachTo="hidelink" operation="hide" event="onclick"/>
       </h:panelGroup>
       </f:facet>
       <h:form>
       <a:commandButton id="acceptButton" value="Accept" action="#{employeeSearchTable.removeSelected}"
       oncomplete="Richfaces.hideModalPanel('employeeTableConfirmationPanel');" reRender="employeeDetails"/>
       <a:commandButton id="cancelButton" value="Cancel" oncomplete="Richfaces.hideModalPanel('employeeTableConfirmationPanel');"/>
       </h:form>
       </rich:modalPanel>
      
      </ui:define>
      </ui:composition>
      


      Any help will be appreciated, thanks!
      B.