title: Pnotify don't works in xpages : error javascript
body: <p>I tried to call the pnotify with a button.</p>
  
  <p>When I clic and if there isn't message, then a message (pnotify) arrives with success and the same with error int the other case.</p>
  
  <pre><code> &lt;xp:div id="divMessages"&gt;  
  &lt;xp:messages id="messagesValidation" styleClass=" customErreurSaisie customErreur"&gt;
      &lt;/xp:messages&gt;              
  &lt;/xp:div&gt;   
  
  &lt;xp:button id="btnEnregistrer"&gt;
              &lt;xp:eventHandler event="onclick" submit="true"  refreshMode="partial" refreshId="divMessages"&gt;
  &lt;xp:this.action&gt;
                      &lt;xp:actionGroup&gt;
                          &lt;xp:saveDocument var="dsdModeleDeMasque"&gt;
                          &lt;/xp:saveDocument&gt;
                      &lt;/xp:actionGroup&gt;
                  &lt;/xp:this.action&gt;               
  &lt;xp:this.onComplete&gt;&lt;![CDATA[
  
  
                      var messages = XSP.getElementById("#{id:messagesValidation}");
                      if (messages) {
                                                  notifyLastAction("Document non sauvegardé", "essai", "error");
                      } else  {
  
                          notifyLastAction("Document sauvegardé", "essai", "success");
                      }
                      var proprietes = XSP.partialRefreshGet("#{id:lesProprietes}");
                      if (proprietes) 
                      {
                          XSP.partialRefreshGet("#{id:lesProprietes}");
                      }
                  ]]&gt;&lt;/xp:this.onComplete&gt;
                              &lt;/xp:eventHandler&gt;
  &lt;/xp:button&gt;
  </code></pre>
  
  <p>My error in the console is 
  TypeError: "Impossible to get the property "destroy" with null or undefined 
  reference ".</p>
  
  <p>Could you help me ?</p>