AnsweredAssumed Answered

Where to put custom view-render

Question asked by riccardog on Feb 7, 2014
Latest reply on Feb 12, 2014 by riccardog
Hi,

my goal, today, is:  to make my own  custom Documentlibrary View and deploy it be an AMP.
I  begun reading the documentation
http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fdoclib-web-tier.html
and
http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fdoclib-web-tier.html

I also took a look into
share/WEB-INF/classes/surf-config.xml 
and read a lot of blogs;

After all this reading I realized that I can perhaps put my own
<view-render>
  in at least in a couple of places (in my AMP project) , that is
src/main/resourcer/META-INF/share-config-custom.xml
or
amp/config/alfresco/web-extension/share-documentlibrary-config.xml

so,  from   a working copy of
share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml
I pulled out a <b>working</b> example

<view-renderer id="dublin_core" iconClass="table" label="button.view.dublinCore" index="80" widget="Alfresco.DocumentListTableViewRenderer">


and put it in a new xml file.
my brand new file was something like this:

<alfresco-config>
  <config evaluator="string-compare" condition="DocumentLibrary" >
      <doclist>
         <view-renderers>
            <view-renderer id="dublin_core" iconClass="table" label="button.view.dublinCore" index="80" widget="Alfresco.DocumentListTableViewRenderer">
               <dependencies>
                  <js src="components/documentlibrary/documentlist-view-detailed.js" />
                  <js src="components/documentlibrary/documentlist-view-table.js" />
                  <css src="components/documentlibrary/documentlist-view-table.css" />
               </dependencies>
               <json-config>
                  ….
               </json-config>
            </view-renderer>
         </view-renderers>
   </doclist>
   </config>
</alfresco-config>


According to the references,I placed it in some different places and with different names;
I removed/added the nesting into 
<doclist>
and 
< view-renderers>
elements;

After all those attempts , I've never seen my dublinCore table in my document Library :(

Into the xml file I also put the flags to popup the js debug window, so I am pretty confident that the xml is ok ( in fact the debug popup works as it should do).

At this point I am sure I am missing something, so the question is:


when I have an AMP project, where  do I have to put my  <view-renderer>?   Is there a working example somewhere?

Thank you,

RIc

Outcomes