AnsweredAssumed Answered

problem calling path selector in alfresco 5

Question asked by aalvarezfern on Dec 19, 2017
Latest reply on Dec 13, 2018 by rbr

Hello, im migrating a share extension from alfresco 4.1 to alfresco 5.1. Im trying to use  a path selector  in a surf page . I have  a button that triggers the path selector.


Here is the code of the button:


function selectFolder(e){
  var cFolder = new Alfresco.module.DoclibGlobalFolder("doclib-selectFilterPath");

  var allowedViewModes =
 YAHOO.Bubbling.on("folderSelected", function (layer, args)

  var obj = args[1];
   if (obj !== null)

        document.getElementById("rutaExtracto").value = obj.selectedFolder.path;
         document.getElementById("rutaExtractoNodeRef").value = obj.selectedFolder.nodeRef;
         document.getElementById("rutaExtracto").style.color = "black";
        document.getElementById("ruta Error").style.display="none";
}, this);
    allowedViewModes: allowedViewModes,
    containerId: "doclib-selectFilterPath",
    title: "Seleccione la ruta"
 return false; // el boton no haga nada


 in the ftll where the button is placed  i had to insert this includes :


<@markup id="css" >
<#-- CSS Dependencies -->
<@link href="${url.context}/res/modules/documentlibrary/global-folder.css" group="node-header"/>

<@markup id="js" >
<#-- JS Dependencies -->
<script type="text/javascript" src="${url.context}/res/modules/documentlibrary/global-folder.js" group="node-header"></script>


When i press the button the   path  selector appears ,but gets stuck while trying to load  the folder tree.In the browser console i find this error:


Uncaught TypeError: Alfresco.CommonComponentStyleFilterChain is not a constructor
at Alfresco.module.DoclibGlobalFolder.DLGF__buildCustomStyleClass [as _buildCustomStyleClass] (global-folder.js:1521)
at Alfresco.module.DoclibGlobalFolder.DLGF_lND_success (global-folder.js:572)
at Object.handleTransactionResponse (yui-common_5518510ec77ced541930f488625ed9c0.js:13891)
at yui-common_5518510ec77ced541930f488625ed9c0.js:13830


Does someone know why this is happening? how could this be solved? 

Thanks in advance