cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject CForms templates as JX macros
Date Mon, 04 Oct 2004 09:58:48 GMT
Hi all,

I just committed an implementation of the CForms template language as JX 
macros. There already was some prototype version of this (written by 
Chris Oliver) which wasn't complete. This new version implements the 
full template language, including class, union, etc.

To use it, just add the following in your template (which should of 
course be processed by the JXTemplateGenerator):
<jx:import 
uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>

You can then remove the forms transformer from you pipeline and use the 
additional JX variables provided by these macros:
- within a <ft:form-template>, the "form" variables points to the... 
form (eh!)
- within any <ft:*> element, the "widget" variable is the current widget 
idendified by the template element.
- within a <ft:repeater>, "widget" is the current row, "repeater" the 
enclosing repeater and "repeaterLoop" as JX status iterator (see 
jx:forEach) for the row loop.

I updated the "form1_template.xml" example (see the "contacts" repeater) 
to showcase some of the nice things it allows. More will come soon as 
I'm currently preparing my GT talk that will explain this in more details.

Enjoy,
Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message