03-24-2006 12:13 AM
03-24-2006 06:20 AM
org.alfresco.web.ui.repo.component.template.DefaultModelHelper
In this class we generate the model (a Map of named objects) that the template is executed against. Any custom methods need to be part of that map. The method is made available to your template code using the name of the object in the Map. If you look for these lines:
// add custom method objects
root.put("hasAspect", new HasAspectMethod());
root.put("message", new I18NMessageMethod());
root.put("dateCompare", new DateCompareMethod());
you'll see that we add our custom methods here. So if you add your own class to the source tree and then add it to the objects added at this point then your method will be made available to templates executing through the web-client. You will need to build Alfresco from source to do this at present. I think will we add a task to allow custom method to be added via config at a later date.03-27-2006 12:42 AM
01-26-2007 06:41 AM
01-26-2007 12:48 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.