AnsweredAssumed Answered

The customizing use of 'Alfresco.DocumentList' component

Question asked by kot4 on Jun 15, 2012
Latest reply on Jun 22, 2012 by kot4
Hi everyone
I am developing an extension of alfresco and need to view a specific directory as the root directory. I use "Alfresco.DocumentList" component in Repo Browser mode like this:


<#include "include/documentlist.lib.ftl" />
<@documentlistTemplate>
<script type="text/javascript">//<![CDATA[
   new Alfresco.DocumentList("${args.htmlid}").setOptions({
      <#–<#if repositoryUrl??>repositoryUrl: "${repositoryUrl}",</#if>–>
      siteId: "",
      containerId: "",
      rootNode: ${rootFolderPath},
      usePagination: ${(args.pagination!false)?string},
      sortAscending: ${(preferences.sortAscending!true)?string},
      sortField: "${(preferences.sortField!"cm:name")?js_string}",
      showFolders: ${(preferences.showFolders!true)?string},
      simpleView: ${(preferences.simpleView!false)?string},
      highlightFile: "${(page.url.args["file"]!"")?js_string}",
      replicationUrlMapping: ${replicationUrlMappingJSON!"{}"},
      repositoryBrowsing: true,
      useTitle: ${(useTitle!true)?string},
      userIsSiteManager: false
   }).setMessages(
      ${messages}
   );
//]]></script>
</@>
where ${rootFolderPath} is my custom path to some root node.

Everything works correctly, but I have a slight problem: "Alfresco.DocumentList" component can display the new directory is not earlier than a few seconds after its creation. And if I try to open a new directory as the root directory before the expiration of a few seconds after its creation, "Alfresco.DocumentList" component shows Company Home as root directory. User can try to open a new directory without wait, so I need fix this problem, or I should learn to recognize the time after which the component is working properly.

Thanks

Outcomes