4 Replies Latest reply on Oct 5, 2007 8:17 PM by rachana patel

    a4j:poll issues, please suggest!

    rachana patel Newbie

      Hi Everyone,

      I have the following situation:

      I have a inline popup (overlaid div) which again opens a window popup. Whenever window popup is opened I start a polling. Polling should stop when window popup is closed. I could do this using myWindow.closed function in "onsubmit" attribute. But the problem is many a times it stops the polling at a wrong time actually before doing the job.
      I could not fix above so I let polling be opened. Inline popup has cancel/save button which will hide it.
      However if polling is open and cancel/save button are hit in the inline popup, last poll action will bring back the popup again. If you hit cancel/save second time it goes.

      How can I resolve this, I tried a lot but I have not figured out a way:

      here is part of jsp which opens polling :

      <a4j:poll action="#{backing_KnowMngmtBean.getFileName}"
       reRender="rtform:form2:sendNotification:attachFile, rtform:form2:sendNotification:mailOuterDiv"
       interval="100" onsubmit="if('#{sessionScope.fileName}' == null||'#{sessionScope.fileName}' == ''){return false;} else {return true;}"

      Action Method

      public String getFileName(){
       //reset style
       custSearchObj.strEnabled = true;
       String strFileName = "";
       if(session.getAttribute("fileName") != null)
       strFileName = (String)session.getAttribute("fileName");
       if((strFileName != null || !strFileName.equals("")) && !strFileName.equals("true")){
       }catch(Exception e){
       isellerror = e.toString();
       return null;