JS API - reportexplorer - Unable to get the File names of the folder content.
<p><span style="color:rgb(0,0,0);">Hello Sir,</span></p>
<p> </p>
<p><span style="color:rgb(0,0,0);">I am tring to fetch the <u>file names</u> from the given folder present in the actuate server file system. There are many files in the folder, as shown in the screenshot attachment.</span></p>
<p> </p>
<p><span style="color:rgb(0,0,0);">Please suggest where am i making the mistake or missing something to get the file names. It should be a simple task.</span></p>
<p> </p>
<p> </p>
<p><span style="color:rgb(0,0,255);">Below is the code sample i am trying to use :- </span></p>
<p> </p>
<p><span style="color:rgb(0,0,255);">function</span> afterInitCallback() {</p>
<p>
rptExp = <span style="color:rgb(0,0,255);">new</span> actuate.ReportExplorer(<span style="color:rgb(128,0,0);">"fileListDiv"</span>);<br>
rptExp.setFolderName(<span style="color:rgb(128,0,0);">"/Resources/Data Objects"</span>);<br>
rptExp.setResultDef([<span style="color:rgb(128,0,0);">"Name"</span>, <span style="color:rgb(128,0,0);">"FileType"</span>, <span style="color:rgb(128,0,0);">"Version"</span>]);<br>
rptExp.submit();</p>
<p> ////The above code works fine and shows the folder structure into the webpage as desired. </p>
<p><br>
<span>////Fetch the Folder Items.</span></p>
<p><span> ////Problem is here somewhere.. I am not able to get the file array.</span><br>
<span style="color:rgb(0,0,255);">var</span> fItems = <span style="color:rgb(0,0,255);">new</span> actuate.reportexplorer.FolderItems();<br>
fItems.setFetchHandle(<span style="color:rgb(128,0,0);">"/Resources/Data Objects"</span>);<br>
<span style="color:rgb(0,0,255);">var</span> handle = fItems.getFetchHandle();<br>
<span style="color:rgb(0,0,255);">var</span> fileArr = fItems.getItemList;<br>
alert(fileArr.length); ////It is returning Zero..<br>
}</p>