11-23-2008 10:46 AM
#{facesContext.externalContext.request.requestedSessionId}
11-23-2008 12:55 PM
<r:template template="/alfresco/templates/mydashlet.html.ftl" model="#{mycustom.templateModel}"/>
11-24-2008 05:37 AM
11-24-2008 09:02 AM
11-26-2008 09:50 AM
Hi all,
I'm developing a custom dashlet and I need to access the current session Id, to do that I need to access HttpServletRequest.
Anybody know how to access it from inside freemarker template?
${santoso.sessionId}
11-26-2008 11:32 AM
11-27-2008 09:23 AM
Thanks, TemplateProcessorExtension seems to be a great idea.
However I couldn't find the documentation of it, could you pass me the link to the documentation?
11-27-2008 12:05 PM
06-22-2009 10:36 AM
public class BibtexTemplate extends BaseTemplateProcessorExtension
{
private BibtexService bibtexService;
public String NodeToBibtexString(String nodeId)
{
StoreRef storeRef = new StoreRef("workspace://SpacesStore");
NodeRef nodeRef = new NodeRef(storeRef, nodeId);
BibtexEntry entry = bibtexService.NodeToBibtex(nodeRef);
return BibtexUtil.BibtexToString(entry);
}
public void setBibtexService(BibtexService bibtexService)
{
this.bibtexService = bibtexService;
}
}
2) Spring configuration (file "[whatever-you-like]-context.xml")
<bean id="bibtexTemplateExtension" parent="baseTemplateImplementation" class="com.matrixware.irss.bibtex.BibtexTemplate">
<property name="extensionName">
<value>bibtexTempl</value>
</property>
<property name="bibtexService">
<ref bean ="BibtexService"/>
</property>
</bean>
3) Use the new root object in freemarker template
<#list rows as row>
${bibtexTempl.NodeToBibtexString(row.nodeId)}
</#list>
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.