0
votes

In my XPages application I am using the xe:dynamicViewPanel control and would like to add a standby/wait dialog/popup when a section is being expanded by the user (click on the expand-icon to open the section). Sometimes the view index is not up-to-date and opening a category holding a lot of documents will last a while, in the meantime I want to display some "loading dialog" (which I already have, so, no need to explain how to do this). My problem is, that I can not find any event or entry point where to start from.

Thank you all ! Alex

1

1 Answers

1
votes

You can try code from this link: https://openntf.org/XSnippets.nsf/snippet.xsp?id=standby-dialog-custom-control

If you want to show stanby dialog on the current section, replace the 79 line

var forms=dojo.body() 

with some other container. For example, a partial refresh element

var forms = dojo.byId(refreshId)

In this case you need to replace lines 75 and 140 to pass the id parameter

function StandbyDialog_Started(refreshId) { 
    try{
      if(StandbyDialog_Do==true){
          if(this.StandbyDialog_Obj==null) {          
                var forms= (refreshId)?dojo.byId(refreshId):dojo.body();           
                  this.StandbyDialog_Obj = new dojox.widget.Standby({ 
                          target: forms,
                          zIndex: 10000
                  }); 
                 document.body.appendChild(this.StandbyDialog_Obj.domNode); 
                 this.StandbyDialog_Obj.startup(); 
          }
          StandbyDialog_StoreField()
          setTimeout("if(StandbyDialog_Do==true){StandbyDialog_StoreField()}",50);
          setTimeout("if(StandbyDialog_Do==true){this.StandbyDialog_Obj.show()}",200); 
        }
    }catch(e){
        console.log("StandbyDialog_Started:"+e.toString())
    }
}

and

dojo.subscribe( 'partialrefresh-start', null, function( method, form, refreshId ){  
    StandbyDialog_Do=true
    StandbyDialog_Started(refreshId) 
});

I didn't test it, but I hope it can help you to go further.