OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | exoplatform List | Febuary 2007 Index

<--  Date Index  --> <--  Thread Index  -->

Velocity


Hi all,

I have a very simple problem as I have created a portlet 
and inside that portlet i intend to display and input some 
data for the JCR.
To do so we use the
org.exoplatform.services.cms.templates.TemplateService
and Velocity

To display a node it is perfect and work great.
The problem occurs when parsing the dialog form :
It actually display 

Title #jsfDialogFormField("inputName=title" "jcrPath=/node/exo:title"
"widget=text")

As you can see the macro #jsfDialogFormField isn't interpreted.
I suspect i didn't initiated correctly the Velocity app. Here is a piece
of my code : 

TemplateService aTemplateServ = (TemplateService)
PortalContainer.getInstance().getComponentInstanceOfType
(TemplateService.class);

String theTemplate = aTemplateServ.getTemplate(true, nodeType);
Velocity.init();
VelocityContext context = new VelocityContext();
try
{
    Velocity.evaluate(context, writer, "myCLASS", theTemplate);
}
catch(Exception ex)
{}

If you have any ideas, any clues or any pointers to documentation
i could use (i didn't find anything in the velocity documentation
except configuration file to load macros) it would be greatly
appreciated.

Thanks in advance,

-- 
Laurent Laudinet
Open Source Software Architect - ThereSIS
THALES
RD 128;Palaiseau Cedex 91767
Phone : 33169415905
laurent.laudinet@xxxxxxxxxxxxxxx




<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.