Return-Path: Delivered-To: apmail-cocoon-docs-archive@www.apache.org Received: (qmail 89451 invoked from network); 29 Nov 2003 16:00:11 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Nov 2003 16:00:11 -0000 Received: (qmail 98751 invoked by uid 500); 29 Nov 2003 16:00:04 -0000 Delivered-To: apmail-cocoon-docs-archive@cocoon.apache.org Received: (qmail 98731 invoked by uid 500); 29 Nov 2003 16:00:04 -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 Delivered-To: mailing list docs@cocoon.apache.org Received: (qmail 98717 invoked from network); 29 Nov 2003 16:00:04 -0000 Received: from unknown (HELO otsrv1.iic.ugent.be) (157.193.121.51) by daedalus.apache.org with SMTP; 29 Nov 2003 16:00:04 -0000 Received: from otsrv1.iic.ugent.be (localhost [127.0.0.1]) by otsrv1.iic.ugent.be (8.11.6/8.11.6) with ESMTP id hATG05p04124 for ; Sat, 29 Nov 2003 17:00:05 +0100 Date: Sat, 29 Nov 2003 17:00:05 +0100 Message-Id: <200311291600.hATG05p04124@otsrv1.iic.ugent.be> From: stevenn@outerthought.org To: docs@cocoon.apache.org Subject: [WIKI-UPDATE] CocoonFormsRoadmap XMLIndiceCocoon2.1 WoodyDatatypeReference Sat Nov 29 17:00:05 2003 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Page: http://wiki.cocoondev.org/Wiki.jsp?page=CocoonFormsRoadmap , version: 11 on Sat Nov 29 15:53:18 2003 by 80.183.30.23 - vote: +1 (RP), +1 ([AH|AndreasHochsteger])\\ + vote: +1 (RP), +1 ([AH|AndreasHochsteger]), +1 ([UC|UgoCei])\\ ? ++++++++++++++++++ - vote: +1 (RP), +1 ([AH|AndreasHochsteger])\\ + vote: +1 (RP), +1 ([AH|AndreasHochsteger]), +1 ([UC|UgoCei])\\ ? ++++++++++++++++++ - vote: +1 (RP)\\ + vote: +1 (RP), +1 ([UC|UgoCei])\\ - vote: +0 (RP), +1 ([AH|AndreasHochsteger])\\ + vote: +0 (RP), +1 ([AH|AndreasHochsteger]), +1 ([UC|UgoCei])\\ ? ++++++++++++++++++ - status: done (needs documentation) \\ + status: done\\ - vote: \\ + vote: +1 ([UC|UgoCei])\\ - vote: +1 (DB), +1 ([AH|AndreasHochsteger])\\ + vote: +1 (DB), +1 ([AH|AndreasHochsteger]), +1 ([UC|UgoCei])\\ ? ++++++++++++++++++ Page: http://wiki.cocoondev.org/Wiki.jsp?page=XMLIndiceCocoon2.1 , version: 5 on Sat Nov 29 15:39:00 2003 by Vadim + __NOTE:__ While for Xindice 1.0 default port is 4080, Xindice 1.1 server is deployed on top of servlet engine, and you should use servlet engine's port number, such as 8080 or 8888. + Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyDatatypeReference , version: 6 on Sat Nov 29 15:38:11 2003 by 80.183.30.23 - !!Selection lists: flow-jxpath implemenation + !!Selection lists: flow-jxpath implementation ? + + !!Selection lists: enum implementation + + This type of selection list outputs a list of items corresponding to the possible instances of an enumerated type (see below). + + Example: + + {{{ + + }}} + + outputs: + + {{{ + + + + + com.example.Sex.MALE + + + + + com.example.Sex.FEMALE + + + + }}} + + If you don't want an initial null value, add a __nullable="false"__ attribute to the __wd:selection-list__ element. + + |enum|Enumerated type|enum + !!Enumerated datatypes + + The __enum__ datatype is meant to be used with types implementing Joshua Bloch's [typesafe enum pattern|http://developer.java.sun.com/developer/Books/shiftintojava/page1.html#replaceenums]. The following is a possible implementation: + + {{{ + package com.example; + + public class Sex { + + public static final Sex MALE = new Sex("M"); + public static final Sex FEMALE = new Sex("F"); + private String code; + + private Sex(String code) { this.code = code; } + } + }}} + + The following snippet shows the usage of this type: + + {{{ + + Sex + + + com.example.Sex + + + + + }}} + + If your enumerated type does not provide a {{toString()}} method, the enum convertor will use the fully qualified class name, followed by the name of the {{public static final}} field referring to each instance, i.e. {{"com.example.Sex.MALE"}}, {{"com.example.Sex.FEMALE"}} and so on. + + If you provide a {{toString()}} method which returns something different, you should also provide a {{fromString(String, Locale)}} method to convert those strings back to instances. + + The enum datatype is typically used together with the __enum__ selection list type.