AnsweredAssumed Answered

Document Picker in Custom Surf Page

Question asked by filipeaugustosantos on Sep 12, 2018

I am creating a toolkit for Alfresco Community, containing editor of pdf files, converters, reading and writing of QrCode, besides this I was able to create customized dashlets and pages (tool of creation of flows and forms) in the environment Share, but without using the Alfresco template, using only plain html and javascript. Until then I used only the cmis, and the rest-api to interact with the repository, since creating folders and documents automatically. Now I'm developing a Surf page with the Alfresco template ('<#include' /org/alfresco/include/alfresco-template.ftl "/> '), using' markup 'and' region 'as found in the documentation.

I need to create a similar option when attaching Alfresco workflow documents and share-config-custom.xml forms using the "association.ftl" template. That when clicking the button open a pop-up to navigate the repository and amarzenar the value of NodeRef. I believe you can create via javascript to navigate the repository, but would like to know if there is a possibility of using the Alfresco 'document picker'.

Here is my main ftl:

<#include '/org/alfresco/include/alfresco-template.ftl' />
<link href='/share/res/starttask/formbuilder/formbuilderRender.css' rel='stylesheet' />
<script type='text/javascript' ></script>
<script ></script>
<script type='text/javascript' ></script>
<@templateHeader>
</@>

<@templateBody>
<@markup id='alf-hd'>
<div id='alf-hd'>
<@region scope='global' id='share-header' chromeless='true'/>
</div>
</@>
<@markup id='bd'>
<div id='bd' style='padding: 5px'>
<@region id='process' scope='page' />
</div>
<br>
<div id='form' style='border: 2px solid #ccc; padding: 15px;border-radius:10px; display: none'>
<div id='formheader' >
<@region id='formheader' scope='page' />
</div>
<div id='renderMe' >

</div>
<div id='formfooter' >
<@region id='formfooter' scope='page' />
</div>
</div>
</@>
</@>

<@templateFooter>
<@markup id='alf-ft'>
<div id='alf-ft'>
<@region id='footer' scope='global' />
</div>
</@>
</@>

Outcomes