cancel
Showing results for 
Search instead for 
Did you mean: 

User Interaction

richardeb
Champ in-the-making
Champ in-the-making
Hello,

I have a little script that needs user interaction. The user has to select an existing folder and an existing file. But I'm not very familar with the Alfresco scripting engine. So what is the best way to allow the user to select a folder and a file?

Thank You
1 REPLY 1

marco_altieri
Star Contributor
Star Contributor
Hi,

could you please describe better where this script will be used: is it dashlet ? is it a custom share page or an external application?

if you need to browse documents inside Share, you can use the "form engine" that Share uses to render forms: for example it is used in the search page or in the "edit properties" page.
Refers to:
http://wiki.alfresco.com/wiki/Forms
for more information.

If you cannot use the form engine, you can still use the browse functionality available in Share using directly the "object finder".
The object finder is a javascript module that Share uses to browse the repository.

The file:

    webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/form/controls/common/picker.inc.ftl

contains an example of the use of this javascript module.

This ftl is included by the ftls:
webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/form/controls/authority.ftl
webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/form/controls/association.ftl
webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/form/controls/category.ftl

authority.ftl is used to browse and select users.
association.ftl is used to browse and select documents.
category.ftl is used to browse and select categories.

These ftl files are part of the form engine.

If you want an example of the integration of the form engine outside Share, you can study the AWE module.