3 Replies Latest reply on May 15, 2007 4:51 AM by Ilya Shaikovsky

    bug when Rich:Modalpanel, a4j:poll, rich:tree

    liumin hu Master

      hi,

      I meet a very strange problem when combine rich:modalpanel, a4j:poll, rich:tree. here is a test case. the Rich:ModalPanel cant be closed when the second time it is opened by a4j:poll. this happens only when there is a rich:tree in the same page . i finded the problem with firebug, everytime when a4j:poll call ajax request, it create a modalcontainer with the same id, so hidemodal doesn't work more.

      liu

      PS: I am using myfaces 1.1.5, richfaces 3.0.1, a4j 1.1.1, facelets 1.1.12, tomahawk 1.1.5


      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:rich="http://richfaces.ajax4jsf.org/rich">
      
       <body>
       <rich:modalPanel id="modalErr" width="400" height="118" zindex="2000" style="padding:0px !important" resizeable="false">
       <f:facet name="header">
       <h:outputText value="Rapport d'état" />
       </f:facet>
       <a4j:outputPanel layout="block" style="position:absolute; top:22px; bottom:0px; left:0px; right:0px; ">
       <a4j:form style="width:100%; height:100%; margin:0px">
       <a4j:outputPanel layout="block" >
       ----------------
       </a4j:outputPanel>
       <a4j:commandButton value="Ok" styleClass="button" oncomplete="Richfaces.hideModalPanel('modalErr')"/>
       </a4j:form>
       </a4j:outputPanel>
       </rich:modalPanel>
      
      
       <a4j:outputPanel ajaxRendered="true" layout="none">
      
       <a4j:form>
       <a4j:poll id="pollerror" interval="10000" reRender="pollerror,modalErr" limitToList="true" oncomplete="Richfaces.showModalPanel('modalErr')" />
       <rich:tree id="tree1"
       switchType="client"
       icon="#{tree1.imgNode}"
       iconExpanded="../../image/tree/iconMoins.gif"
       iconCollapsed="../../image/tree/iconPlus.gif"
       var="tree1" >
       </rich:tree>
       </a4j:form>
       </a4j:outputPanel>
       </body>
      </html>