11-09-2006 09:03 AM
<%– 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>
11-10-2006 04:37 PM
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!
11-11-2006 06:01 AM
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)
11-11-2006 11:52 AM
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
11-13-2006 05:45 AM
I just tried to use #{r.displayPath} on browse.jsp and got an empty string.
11-13-2006 08:30 AM
11-15-2006 05:58 AM
<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" />
11-15-2006 12:27 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.