As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
"script type="text/javascript" src="/share/res/components/documentlibrary/tree_dc1145d846bf3d93802aab190eb1ffc.js"></script>"
"When you reach a folder "leaf" node then you'll need to call a different REST API (the same one used by documentlist.js widget to populate the DocLib) to get the actual files."
// Create a new tree var tree = new YAHOO.widget.TreeView(this.id + "-treeview"); var fpanel = Dom.get("alf-filters"), offset = (fpanel ? parseInt(fpanel.style.width, 10) : 160) + 390; var columnDefinitions = [ // I deleted column entries ]; // DataTable definition this.dataSourceUrl = $combine(Alfresco.constants.URL_SERVICECONTEXT, "components/documentlibrary/data/doclist/"); this.widgets.dataSource = new YAHOO.util.DataSource(this.dataSourceUrl, { responseType: YAHOO.util.DataSource.TYPE_JSON, responseSchema: { resultsList: "items", metaFields: { paginationRecordOffset: "startIndex", totalRecords: "totalRecords", totalRecordsUpper : "totalRecordsUpper" // if null then totalRecords is accurate else totalRecords is lower estimate (if -1 upper estimate is unknown) } } }); this.widgets.dataTable = new YAHOO.widget.DataTable(this.id + "-treeview", columnDefinitions, this.widgets.dataSource, { renderLoopSize: this.options.usePagination ? 16 : Alfresco.util.RENDERLOOPSIZE, initialLoad: false, dynamicData: true, MSG_EMPTY: this.msg("message.loading") }); this.widgets.dataTable.doBeforeLoadData = function DL_doBeforeLoadData(sRequest, oResponse, oPayload) { alert(oResponse.results.length); for (var i = 0, ii = oResponse.results.length; i < ii; i++) { alert(oResponse.results.node.toSource()); oResponse.results.jsNode = new Alfresco.util.Node(oResponse.results.node); } }; this.widgets.dataTable.fireEvent("renderEvent", { type: "renderEvent" }); this.widgets.treeview = tree;