Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 10959 invoked from network); 4 Oct 2004 09:59:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Oct 2004 09:59:38 -0000 Received: (qmail 31925 invoked by uid 500); 4 Oct 2004 09:58:56 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 31770 invoked by uid 500); 4 Oct 2004 09:58:54 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 31739 invoked by uid 99); 4 Oct 2004 09:58:53 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [84.96.21.10] (HELO mail.anyware-tech.com) (84.96.21.10) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 04 Oct 2004 02:58:52 -0700 Received: from [10.0.0.130] (unknown [10.0.0.130]) by mail.anyware-tech.com (Postfix) with ESMTP id DA9935EB8D for ; Mon, 4 Oct 2004 11:58:49 +0200 (CEST) Message-ID: <41611ED8.9030207@apache.org> Date: Mon, 04 Oct 2004 11:58:48 +0200 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: CForms templates as JX macros Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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): You can then remove the forms transformer from you pipeline and use the additional JX variables provided by these macros: - within a , the "form" variables points to the... form (eh!) - within any element, the "widget" variable is the current widget idendified by the template element. - within a , "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 }