AnsweredAssumed Answered

Custom dialog disappears

Question asked by pau.carre on Sep 19, 2008
Latest reply on Oct 28, 2008 by libman
Hi, I am developing an add-in for Alfresco. This add-in is a custom dialog linked to each document. I have had no problem since the dialog icon disappeared from all documents. After a lot of "trial and error" I finally had to reinstall Alfresco and then the new icon appeared. But, lately it disappeared again. I did not change any relevant file from the add in (just som JSPs). So I do not know why the icon disappears. I restart the server each time I deploy a new version and I do not see any error in the apache tomcat log.

Any idea of how to identify the problem?

Pau Carré Cardona



         <!– Launch Add Aspect Dialog –>
         <action id="afegir_signatura">
            <label>Afegir signatura</label>
               <param name="id">#{}</param>
         <!– Add action to more actions menu for each space –>
         <action-group id="document_browse">
            <action idref="afegir_signatura" />
         <dialog name="afegirSignatura" page="/jsp/extension/add-signature.jsp" managed-bean="AddSignatureDialog"
                 icon="/images/icons/sign.png" title="Afegir signatura"
                 description="Afegeix una signatura al document actual" />


package org.alfresco.sample;

import java.util.HashMap;
import java.util.List;
import javax.faces.context.FacesContext;
import org.alfresco.repo.content.RoutingContentService;
import org.alfresco.repo.model.filefolder.FileFolderServiceImpl;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;

import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.bean.dialog.BaseDialogBean;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.repository.Node;

public class AddSignatureDialog extends BaseDialogBean {
   protected String url = null;
   protected String finishImpl(FacesContext context, String outcome)
         throws Exception {      
      return outcome;      

   public boolean getFinishButtonDisabled() {
      return false;

   public String getURL() {
      if (url == null) {
         Node documentNode = browseBean.getDocument();
         NodeRef documentNodeRef = documentNode.getNodeRef();
         url = DownloadContentServlet.generateDownloadURL(documentNodeRef,
      return url;

   public void setURL(String url) {
      this.url = url;


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"




<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>
<%@ taglib uri="" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ include file="base.jspf" %>
  String target=base + "/jsp/extension/receive.jsp";
  String codebase = "../extension/signatureapplet.jar,../extension/signaturaapi-2.2.jar";
  String width = "700";
  String height = "300";
<applet width="<%=width%>" height="<%=height%>" align="baseline"
           source="<%=base%><c:out value="${DialogManager.bean.URL}"/>;jsesssionid=<%=session.getId()%>"