apache > cocoon
 
Font size:      

Cocoon Forms: Template Generator (2.1 legacy document)

Warning
This document was copied as is from the Cocoon 2.1 documentation, but has not yet been fully reviewed or moved to its new home.

Concept

The same "ft:" tags as provided by the template transformer are also available as macros for the JXTemplate generator.

Before the availability of these macros, the JXTemplate generator was already often used in the form publishing pipeline. It makes it possible to dynamically include additional data on the form page and to conditionally include parts of the page (and thus conditionally show widgets). Moving the interpretation of the ft: tags directly into generator makes this even more powerful. Think of the possibility of not showing a repeater table if the repeater contains no rows, and this also for nested repeaters.

Usage

Simply remove the FormsTemplateTransformer from your publishing pipeline, and instead include the following jx statement into your template file:

<jx:import uri="resource://org/apache/cocoon/forms/generation/template.jx"/>

Note that these macros only work when calling the pipeline from flowscript.

Comments

add your comments