cancel
Showing results for 
Search instead for 
Did you mean: 

Document Details Custom Component

stephenl
Champ on-the-rise
Champ on-the-rise
Hi,

I've been developing using a maven dev environment and all has been working well so far but when I deploy the AMP to my locally running Alfresco Community Edition (4.2c) it doesn't seem to work.

I have a custom component (document details view side panel) that displays some custom info in a similar vein to:
http://blogs.alfresco.com/wp/ewinlof/2011/11/09/add-remove-or-replace-components-on-shares-document-...

I have this working fine when I deploy within my local maven dev env & I have since removed anything that may be causing exceptions etc. However the following seems to throw an error:

<#assign el=args.htmlid?js_string/>
<div class="document-details-panel">
  <h2 id="${el}-heading" class="thin dark">${msg("heading")}</h2>
  <div>${msg("text")}</div>
  <script type="text/javascript">//<![CDATA[
    Alfresco.util.createTwister("${el}-heading", "DocumentMetadata");
  //]]></script>
</div>


With the error 'freemarker.core.InvalidReferenceException: Expression args.htmlid' in share.log (after AMP install rather than dev env), does anyone happen to know why 'args' is not populated only when I deploy my AMP extension to a live install of Alfresco (but works fine in the dev env)?

Thanks for any info, btw I'm not too clued up on web dev stuff & that's what might be letting me down here.

Steve
1 REPLY 1

stephenl
Champ on-the-rise
Champ on-the-rise
Always, Always, ALWAYS read the instructions carefully….
http://docs.alfresco.com/4.2/tasks/dev-extensions-share-tutorials-add-content.html


The extension module needs to be deployed before it will be visible. Module deployment is a new feature in Alfresco 4.0 that is achieved through a web script found at: http://localhost:8080/share/service/modules/deploy.