AnsweredAssumed Answered

Aikau custom page

Question asked by tavvolley on Mar 5, 2016
Latest reply on Sep 20, 2016 by ddraper
hi, i have some problem with new aikau framework.

I must import some file so I have created a page and into the page i inserted:
-a picker that select a folder where import the file.
-a button that check some config file and split xml…
-a button to import the file (it is possible to import without check, the important is to select a folder where put the new file).

I have create a base page, I added three div and in each div I added one region. In the first region I added the code for the picker but this solution not work :-(.
when I import a region into the page, alfresco insert the script but he didn't refresce (draw to the screen) the picker, seem that alfresco does not compile the code into script tag.

this is the output of the page of the first div:

<div style="height:100px;background-color:red;" id="imp-select-folder-div">
         <script type="text/javascript">//&lt;![CDATA[
require(['surf/f1c5d90ba57a308c459f5e39ac094e07','dojo/domReady!'], function(Page) {
var p = new Page({services:["alfresco\/dialogs\/AlfDialogService", "alfresco\/services\/DocumentService", "alfresco\/services\/SiteService"],widgets:[{"name": "alfresco\/forms\/Form", "config": {"okButtonPublishTopic": "FORM_CONTENTS", "widgets": [{"name": "alfresco\/forms\/controls\/ContainerPicker", "config": {"name": "document", "label": "Choose a Folder"}}]}}],publishOnReady:[]
}, 'content');
});
//]]&gt;</script>
   </div>

i have the code but i don't see the widget.


I created an aikau page and into the model of the page I include the picker and it work fine.

Now I ask how can create the page?

-I must create the picker and push into the page all button?
-can I get the dom of the page (write html into ftl file) and with aikau insert the button where i want?
-how can handle the button event? I must create a wigets for all buttons and insert the code into js file that import into the dependency of the widget like this:


….
<web-framework>
            <dojo-pages>
              <packages>
                <package name="example" location="js/example"/>
              </packages>
            </dojo-pages>
          </web-framework>
….

thanks

Outcomes