09-17-2010 07:30 AM
09-17-2010 12:49 PM
<r:template template="alfresco/templates/example.ftl" model="#{MyBean.templateModel}" />
Example Bean code to return a model: /**
* Returns a model for use by a template on the Document Details page.
*
* @return model containing current document and current space info.
*/
public Map getTemplateModel()
{
HashMap model = new HashMap(1, 1.0f);
TemplateNode documentNode = new TemplateNode(getDocument().getNodeRef(), this.nodeService);
model.put("mydocument", documentNode);
return model;
}
09-17-2010 07:11 PM
public Map getTemplateModel()
{
Map<String, Object> model = new HashMap<String, Object>(4, 1.0f);
model.put("document", getDocument().getNodeRef());
model.put("space", this.navigator.getCurrentNode().getNodeRef());
model.put(TemplateService.KEY_IMAGE_RESOLVER, imageResolver);
return model;
}
and in this code, no TemplateNode is used ?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.