cancel
Showing results for 
Search instead for 
Did you mean: 

Fremarker plugin

ribz33
Champ on-the-rise
Champ on-the-rise
Hi,

Im developping some template with freemarker.
I had seen that there is a plugin eclipse which seems to be very cool.
I wanted to configure it with alfresco model but i didnt found alfresco model class.

I think its not so easy.
I have found this screencast :
http://freemarker-ide.sourceforge.net/screencasts/freemarker-ide-context.html

My question do you think it is possible to do same thing with alfresco model ?

Thx in advance
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
The Alfresco model used in our FreeMarker integration is created dynamically at runtime. It is based on various 'static' objects such as the Company Home reference, but mostly basic on dynamic objects such as the current user, current user Home Space, current Document etc.

The class that provides the model is called:
org.alfresco.web.ui.repo.component.template.DefaultModelHelper

You may be able to pass in the correct noderef objects to the buildDefaultModel() method to create a valid Alfresco model. The model needs to execute within the context of a running Alfresco server due to the dynamic objects it creates when walking the model.

Thanks,

Kevin

ribz33
Champ on-the-rise
Champ on-the-rise
no i didnt succeed it …

Smiley Sad i had no more time to do it but im sure that can be very helpfull!

kevinr
Star Contributor
Star Contributor
The class that implements the majority of the model in Alfresco is called:
org.alfresco.repo.jscript.Node

Try pointing your Eclipse plugin to that? The names of the root objects are as in the wiki docs:
http://wiki.alfresco.com/wiki/Template_Guide#Default_Model

Thanks,

Kevin