AnsweredAssumed Answered

Use folder properties and user input on share custom page

Question asked by olylak on Jan 23, 2018
Latest reply on Jan 23, 2018 by krutik.jayswal



I'm trying to add some extra functionality to Alfresco Document Library and as I'm new to Alfresco I would like to ask you for some assistance.


What is needed (as example):


1. Create folder

2. Apply custom type demoFolder to the folder (done)

3. Populate demoFolder properties First Name and Last Name with required data (done)

4. Add custom Action Demo Action (done)

5. When Demo Action is triggered - open custom Share demo-page (done)


<config evaluator="string-compare" condition="DocLibActions">
        <action id="demo.action.execute"
            <param name="page">demo-page?nodeRef={node.nodeRef}</param>


The question is:


1. How get folder properties First Name and Last Name from within page template and show it on the page?

2. Is any possibility to get user input before opening custom page and then use this input data and folder properties on the custom page? As it is done in the documentation sample code (but sample code redirects to the backend action and not to the custom page).


                        <action id="alfresco.tutorials.doclib.action.sendAsEmail"                                icon="email"                                type="javascript"                                label="alfresco.tutorials.doclib.action.sendAsEmail.label">                            <param name="function">onActionFormDialog</param>                            <param name="itemKind">action</param>                            <param name="itemId">send-as-email</param>                            <param name="mode">create</param>                            <param name="destination">{node.nodeRef}</param>                     

3. Or using the javascript type action is it possible to collect all required data (folder properties, user form input data) on the action implementation (ActionExecuterAbstractBase) and pass it to the custom page demo-page to render it based on that data?


Or you can suggest other way of implementing it.


Thanks in advance for any help.