title: How to call java method using javascript in ZK MVVM?
body: <p>I am using Edraw Office Viewer component to open &amp; edit the file. I want to save my file to my destination point so I am using JavaScript to save the file. But I am stuck at a point. I am showing my code below to save document using JavaScript.</p>
  
  <pre><code>function f_saveDocument(){
      if(document.OA1.IsOpened)           
      {   
      var saveAsFileName = document.getElementById('hdnFileName').value;
      alert(saveAsFileName);
          var fileFormat = saveAsFileName.substring(saveAsFileName.lastIndexOf("."));
          if(fileFormat == '.docx') {
              var toUnLockFile = 'MergeTest'+fileFormat;
              var tempFileLocation = document.OA1.GetTempFilePath(saveAsFileName);
              var tempToUnLockFileLocation = document.OA1.GetTempFilePath(toUnLockFile);
              document.OA1.SaveAs(tempFileLocation,12);
              document.OA1.SaveAs(tempToUnLockFileLocation,12);
              document.OA1.HttpInit();
              document.OA1.HttpAddPostFile(tempFileLocation);
                document.OA1.HttpPost(""); 
              document.OA1.ClearTempFiles();
          } else {
          alert("asdsa");
              document.OA1.HttpInit();
              document.OA1.HttpAddPostOpenedFile(saveAsFileName);
               **zAu.send(new zk.Event(zk.Widget.$('$btnSave'), "saveFile", {'' : {'data' : {'nodeId': ''}}}, {toServer:true}));** 
           alert("moved");
          }
  
      } 
  </code></pre>
  
  <p>In case of JSP page I can put my JSP URL in <code>HttpPost</code> but in case of ZK how to move from this JavaScript to Java method. So to overcome this problem I am using Widget to call <code>saveFile()</code> method which is in my <code>viewmodel</code> class. But <code>zAu.send</code> is not working fine. Can any body tell other solution to call my Java method from JavaScript in ZK MVVM.</p>