AnsweredAssumed Answered

page con components share

Question asked by scafa91 on Nov 4, 2015
Ciao,
sto provando a creare una pagina custom usando il template della document library su alfresco community 5.0.d

file /myModule/src/main/amp/config/alfresco/web-extension/site-data/pages/mypage.xml


<?xml version='1.0' encoding='UTF-8'?>
<page>
   <title>myPageTitle</title>
   <title-id>page.mypage.title</title-id>
   <description>myPage with Tree view</description>
   <description-id>page.mypage.description</description-id>
   <template-instance>mypage</template-instance>
   <authentication>user</authentication>
</page>


file /myModule/src/main/amp/config/alfresco/web-extension/site-data/template-istances/mypage.xml


<?xml version='1.0' encoding='UTF-8'?>
<template-instance>
   <template-type>org/alfresco/documentlibrary</template-type>
   <properties>
      <pageFamily>mypage</pageFamily>
      <container>mypage</container>
   </properties>
   <components>
      <component>
         <region-id>documentlist</region-id>
         <url>/components/mypage/list</url>
         <properties>
            <pagination>true</pagination>
            <dependencyGroup>documentlibrary</dependencyGroup>
         </properties>
      </component>
    </components>
</template-instance>



file /mymodule/src/main/amp/config/alfresco/web-extension/site-webscripts/components/mypage/list.get.desc.xml


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<webscript>
  <shortname>mypage DocumentList</shortname>
  <description>Document Library: Document List Component</description>
  <url>/components/mypage/list</url>
</webscript>


file /mymodule/src/main/amp/config/alfresco/web-extension/site-webscripts/components/mypage/list.get.html.ftl


<div>
   <h1>mypage component</h1>
</div>



Mi aspetterei che il contenuto di list.get.html.ftl finisse nella region-id documentlist, invece sembra che il mio componente venga totalmente ignorato. Infatti aggiungendo un file list.get.js, questo non viene caricato in pagina (lo vedo usando surfbug e il javascript debugger). Il risultato è che ottengo una pagina con il template corretto ma senza componenti.
Grazie

Outcomes