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.
<%– Primary column for details view mode –%> <a:column id="col10" primary="true" width="200" style="padding:2px;text-align:left" rendered="#{BrowseBean.browseViewMode == 'details'}"> <f:facet name="header"> <a:sortLink id="col10-sort" label="#{msg.title}" value="title" mode="case-insensitive" styleClass="header"/> </f:facet> <f:facet name="small-icon"> <a:actionLink id="col10-act1" value="#{r.title}" href="/alfresco/template?templatePath=/Company%20Home/Data%20Dictionary/Presentation%20Templates/inline_doc.ftl&contextPath=#{r.path}" target="new" image="#{r.fileType16}" showLink="false" styleClass="inlineAction" /> </f:facet> <a:actionLink id="col10-act2" value="#{r.title}" href="#{r.url}" target="new" /> <r:lockIcon id="col10-lock" value="#{r.nodeRef}" align="absmiddle" /> </a:column>
I was reading through the wiki on URL addressability and found the part about using the template servlet to display content with a template… Problem here is that in order to do this I need to get the path of the content node so I can construct the proper URL.I've tried changing browse.jsp as follows: <%– Primary column for details view mode –%> <a:column id="col10" primary="true" width="200" style="padding:2px;text-align:left" rendered="#{BrowseBean.browseViewMode == 'details'}"> <f:facet name="header"> <a:sortLink id="col10-sort" label="#{msg.title}" value="title" mode="case-insensitive" styleClass="header"/> </f:facet> <f:facet name="small-icon"> <a:actionLink id="col10-act1" value="#{r.title}" href="/alfresco/template?templatePath=/Company%20Home/Data%20Dictionary/Presentation%20Templates/inline_doc.ftl&contextPath=#{r.path}" target="new" image="#{r.fileType16}" showLink="false" styleClass="inlineAction" /> </f:facet> <a:actionLink id="col10-act2" value="#{r.title}" href="#{r.url}" target="new" /> <r:lockIcon id="col10-lock" value="#{r.nodeRef}" align="absmiddle" /> </a:column> but the reference to #{r.path} in the href of actionLink col10-act1 always returns an empty string.Help!
I could be all wet about this but I dont think you have access to r.path here. For the sake of argument put r.nonFound You wont get a bind error, just an empty string. r.path would be nice to have here. I don't spend much time focusing on the Alfresco UI so I may be wrong but I think the properties that you have access to are not the ones in the java class but the properties given by the M2 Model so for example Modifier etc.I could be wrong about that. If I am not, I am not sure how you get around the issue of properties from differnt names spaces that have the same name (which makes me think I am wrong)
I could be all wet about this but I dont think you have access to r.path here. For the sake of argument put r.nonFound You wont get a bind error, just an empty string. r.path would be nice to have here. I don't spend much time focusing on the Alfresco UI so I may be wrong but I think the properties that you have access to are not the ones in the java class but the properties given by the M2 Model so for example Modifier etc.I could be wrong about that. If I am not, I am not sure how you get around the issue of properties from differnt names spaces that have the same name (which makes me think I am wrong)Yes you are wrong. There is a lot more going on in the web-client than simple access to DD properties for a node. We have the concept of a client Node wrapper which as well as providing wrapped and cached access to properties, associations, aspects etc. also provides a mechanism called Property Resolver which allows the concept of pseudo calculated properties which can be used to generate richer UI pages. The .path property is available and provided by a Property Resolver which dynamically calls the nodeservice.getPath(noderef) method to return the Path object. It is the actual Path object instance though not a simple String object which is returned, so this is why the r.path does not appear to output anything useful for the JSF binding above.There is an additional pseudo property called .displayPath which dynamically generates the cm:name based path to an object as a String - this may be what you require?Thanks,Kevin
I just tried to use #{r.displayPath} on browse.jsp and got an empty string.
<a:actionLink id="col10-act1" value="#{r.title}" href="/alfresco/template/workspace/SpacesStore/#{r.id}?templatePath=/Company%20Home/Data%20Dictionary/Presentation%20Templates/inline_doc.ftl" target="new" image="#{r.fileType16}" showLink="false" styleClass="inlineAction" />