As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
/** * (Based on Alfresco 2.1.) */ protected void renderReadOnlyAssociations(FacesContext context, ResponseWriter out, NodeService nodeService) throws IOException { if (this.originalAssocs.size() > 0) { out.write("<table cellspacing='0' cellpadding='2' border='0'>"); Iterator iter = this.originalAssocs.values().iterator(); while (iter.hasNext()) { out.write("<tr><td>"); ChildAssociationRef assoc = (ChildAssociationRef)iter.next(); NodeRef targetNode = assoc.getChildRef(); // if the node represents a person, show the username instead of the name if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetNode))) { out.write(User.getFullName(nodeService, targetNode)); } else if (ContentModel.TYPE_AUTHORITY_CONTAINER.equals(nodeService.getType(targetNode))) { // if the node represents a group, show the group name instead of the name int offset = PermissionService.GROUP_PREFIX.length(); String group = (String)nodeService.getProperty(targetNode, ContentModel.PROP_AUTHORITY_NAME); out.write(group.substring(offset)); } else { /* Original: out.write(Repository.getDisplayPath(nodeService.getPath(targetNode))); out.write("/"); out.write(Repository.getNameForNode(nodeService, targetNode)); */ out.write("<a href=\"/alfresco/navigate/showDocDetails/workspace/SpacesStore/"); out.write(targetNode.getId()); //out.write("/"); //out.write(Repository.getNameForNode(nodeService, targetNode)); out.write("\">"); out.write(Repository.getNameForNode(nodeService, targetNode)); out.write("</a>"); } out.write("</tr></td>"); } out.write("</table>"); }
/* … */ out.write("' onclick=\""); out.write(generateFormSubmit(context, Integer.toString(ACTION_SHOW_DIALOG_FOR_LINK))); out.write("\"/>");
/* … */ out.write("' onclick=\""); out.write(generateFormSubmit(context, Integer.toString(ACTION_SHOW_DIALOG_FOR_LINK+ ACTION_SEPARATOR + targetRef.toString())))); out.write("\"/>");
public void setupContentAction(String id, boolean invalidate)
public void broadcast(FacesEvent event) throws AbortProcessingException { boolean handled = false; if (event instanceof AssocEditorEvent) { AssocEditorEvent assocEvent = (AssocEditorEvent)event; Node node = (Node)getValue(); if (assocEvent.Action == ACTION_OPEN_ASSOC_LINK) { // get browse bean FacesContext fc = FacesContext.getCurrentInstance(); BrowseBean browseBean = (BrowseBean)FacesHelper.getManagedBean(fc, BrowseBean.BEAN_NAME); // redirect String targetID = assocEvent.RemoveRef; // TODO: RemoveRef is re/mis-used!! logger.debug("ACTION_OPEN_ASSOC_LINK: moving to link target node " + targetID + "."); browseBean.setupContentAction(targetID, true); // TODO: true or false? handled = true; } } if (!handled) super.broadcast(event); }