Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 96437 invoked from network); 26 Jun 2005 01:01:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2005 01:01:15 -0000 Received: (qmail 63089 invoked by uid 500); 26 Jun 2005 01:01:14 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 63046 invoked by uid 500); 26 Jun 2005 01:01:14 -0000 Mailing-List: contact docs-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: docs@cocoon.apache.org List-Id: Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 63033 invoked by uid 99); 26 Jun 2005 01:01:14 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2005 18:01:14 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id CBDCF12 for ; Sun, 26 Jun 2005 03:01:12 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Apache Wiki To: docs@cocoon.apache.org Date: Sun, 26 Jun 2005 01:01:12 -0000 Message-ID: <20050626010112.8500.94537@ajax.apache.org> Subject: [Cocoon Wiki] Update of "cmnogueira" by cmnogueira X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification. The following page has been changed by cmnogueira: http://wiki.apache.org/cocoon/cmnogueira ------------------------------------------------------------------------------ + - == CFORMS: Dinamically display radio buttons on a table == - - TARGET-AUDIENCE: '''*advanced*''' [[BR]] - - COCOON-RELEASES: 2.1.7[[BR]] - - DOCUMENT-STATUS: '''*draft*''' reviewed released[[BR]] - ---- - === What you will get from this page === - A piece of code that can dramatically ease the use of radio buttons on a cforms page. - === Your basic skills === - Take a while to understand how cforms various actions example work. - XSL knowledge is also necessary to understand the code i wrote. - - === Technical prerequisites === - All the xsl files under cocoon\samples\blocks\forms\resources. - - At least the following xml files under cocoon\samples\blocks\forms\ - - form1.xml - - form1_template_action.xml - - - - Later you can remove the ones you don't wan't to use. - -------------------------------------------------------- - As you might have noticed the current xsl provided with the cforms example is quite limited. - I needed to display something like this: - - ||radiobutton1||radiobutton2||radiobutton3|| - ||radiobutton4||radiobutton5||radiobutton6|| - - To achieve this efect follow these steps: - - 1. Edit forms-field-styling.xsl - - 1.1 Inside this file look for this line - {{{ - - }}} - - 1.2 Add the following variable line - {{{ - - }}} - - 1.3 Look for the . Replace this hole section with this code - {{{ - - - - - - - - - }}} - - 1.4 Create the template produceColumns with the following code - {{{ - - - - - - - - - - - - - - - checked - - - - - - - - - - - - - - - - - - - - - - - }}} - - 2. Edit form1.xml declare the following widget: - {{{ - - - this is a test - - - - - - - - - - - - - }}} - - - 3. Edit form1_template_action.xml declare the use of the previous widget where you think - is more convenient for you: - {{{ - - - - -
- }}} - - 4. Voilá! This should now produce a table with 3 columns. As you have 6 radiobuttons, - the number of lines will be determined by (6 items/3 columns) = 2 lines. - - ||radiobutton1||radiobutton2||radiobutton3|| - ||radiobutton4||radiobutton5||radiobutton6|| - - - - I would like to thanks to Aaron Bock for his precious xsl help, which was the basis - for this wiki. - - - === page metadata === - - AUTHOR:CarlosMiguelNogueira[[BR]] - - AUTHOR-CONTACT: mailto:cmsbn@student.dei.uc.pt[[BR]] - - REVIEWED-BY:[[BR]] - - REVIEWER-CONTACT:[[BR]] -