Leszek Gawron wrote: <snip/>
I have commited an initial JXTemplateGenerator to o.a.c.template.jxtg.JXTemplateGenerator and moved Jonas' templating proposal to o.a.c.template.v2 package.
Please review.
Nice!
Don't have time to review in any detail right now. I added some basic test cases. Two of them that tries to test that the cocoon object is accesible from expressions are faulty, I didn't get them to work even with the original JXTG, any idea about what goes wrong?
instead of:
<root> protocol: ${cocoon.request.protocol}
<item attr="** ${parameters.test} **"> Some text </item>
</root>
you should do:
<root> protocol: ${request.protocol}
<item attr="** ${cocoon.parameters.test} **"> Some text </item>
</root>
I. regarding the protocol property:
JXTemplateGenerator.setContexts: There is a "request" registered populated from: final Request request = ObjectModelHelper.getRequest(objectModel);
and there is cocoon.request registered populated from:
cocoon.put("request", FOM_JavaScriptFlowHelper
.getFOM_Request(objectModel));It itches me that cocoon.request will only work when working with flow controller. I do not know flow internals to fix that.
II. regarding parameters property:
you have cocoon.parameters:
cocoon.put("parameters", Parameters.toProperties(parameters));and top level "parameters":
map.put("parameters", parameters);Second case does not perform the conversion and this is the problem. I am commiting the fix right now.
-- Leszek Gawron [EMAIL PROTECTED] Project Manager MobileBox sp. z o.o. +48 (61) 855 06 67 http://www.mobilebox.pl mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
