Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 74147 invoked from network); 4 Oct 2006 14:50:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Oct 2006 14:50:22 -0000 Received: (qmail 13652 invoked by uid 500); 4 Oct 2006 14:50:19 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 13583 invoked by uid 500); 4 Oct 2006 14:50:18 -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 List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 13572 invoked by uid 99); 4 Oct 2006 14:50:18 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Oct 2006 07:50:18 -0700 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=HTML_MESSAGE Received: from [81.169.145.174] ([81.169.145.174:62887] helo=natklopstock.rzone.de) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 85/F6-00170-6F9C3254 for ; Wed, 04 Oct 2006 07:49:37 -0700 Received: from sonne.univativ.com (univativ.heagmedianet.de [213.157.13.82] (may be forged)) (authenticated bits=0) by post.webmailer.de (8.13.6/8.13.6) with ESMTP id k94Elx56004312 for ; Wed, 4 Oct 2006 16:47:59 +0200 (MEST) Content-class: urn:content-classes:message Subject: [CForms] Bugfix for broken SuggestionList Widget in CVS version of Cocoon 2.1.x MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6E7C4.2959E000" Date: Wed, 4 Oct 2006 16:48:31 +0200 Message-ID: X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 X-MS-TNEF-Correlator: Thread-Topic: [CForms] Bugfix for broken SuggestionList Widget in CVS version of Cocoon 2.1.x thread-index: AcbnxCk2L8O/CGd6QOCMxjWSAXsbpQ== From: "Christofer.Dutz@univativ.de" To: X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C6E7C4.2959E000 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, =20 I am currently updating to the CVS version of Cocoon and found out that = my suggestion-lists no longer worked. I did a normal build of cocoon and = tried out the sample for suggestion-lists and that didn't work either. I = compared the output of the suggestion-list pipeline to the sample files = shipped in the dojo test folder and saw that they don't have a trailing = ";". After removing this, the samples and my version worked again = without any problems. Maybe it would be good to update the = selection-list2json.xsl or to update the Suggestion-List CForms widget = code if this would result in breaking other parts. =20 Here my updated file: =20 =20 =20 [ ] =20 [" ", " "] , =20 =20 Regards, Chris =20 [ c h r i s t o f e r d u t z ] =20 IT-Berater univativ GmbH & Co. KG Robert-Bosch-Str. 7, 64293 Darmstadt =20 fon: 0 61 51 / 66 717 - 21 fax: 0 61 51 / 66 717 - 29 email: christofer.dutz@univativ.de http://www.univativ.de =20 Darmstadt, Stuttgart, Karlsruhe, D=FCsseldorf =20 ------_=_NextPart_001_01C6E7C4.2959E000 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,

 

I am currently updating to the CVS version of = Cocoon and found out that my suggestion-lists no longer worked. I did a normal = build of cocoon and tried out the sample for suggestion-lists and that = didn’t work either. I compared the output of the suggestion-list pipeline to = the sample files shipped in the dojo test folder and saw that they = don’t have a trailing “;”. After removing this, the samples and my = version worked again without any problems. Maybe it would be good to update the = selection-list2json.xsl or to update the Suggestion-List CForms widget code if this would result = in breaking other parts.

 

Here my updated = file:

 

<?xml = version=3D"1.0"?>

<!--

=A0 Licensed to the Apache Software Foundation (ASF) = under one or more

=A0 contributor license agreements.=A0 See the NOTICE = file distributed with

=A0 this work for additional information regarding = copyright ownership.

=A0 The ASF licenses this file to You under the Apache = License, Version 2.0

=A0 (the "License"); you may not use this = file except in compliance with

=A0 the License.=A0 You may obtain a copy of the = License at

 

=A0=A0=A0=A0=A0 http://www.apache.org/licenses/LICENSE-2.0=

 

=A0 Unless required by applicable law or agreed to in writing, = software

=A0 distributed under the License is distributed on an = "AS IS" BASIS,

=A0 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, = either express or implied.

=A0 See the License for the specific language governing permissions and

=A0 limitations under the License.

-->

<!--

=A0 Transforms a fi:selection-list into a JSON = fragment.

=A0

=A0 @version $Id: selection-list2json.xsl 449149 = 2006-09-23 03:58:05Z crossley $

-->

 

<xsl:stylesheet

=A0 version=3D"1.0"

=A0 xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"

=A0 xmlns:fi=3D"http://apache.org/cocoon/forms/1.0#instance&quo= t;>

 

<xsl:template match=3D"fi:selection-list">

=A0 <dummy-root>

=A0=A0=A0 <xsl:text>[&#10;</xsl:text>

=A0=A0=A0 <xsl:apply-templates/>

=A0=A0=A0 <xsl:text>&#10;]</xsl:text>

=A0 </dummy-root>

</xsl:template>

 

<xsl:template match=3D"fi:item">

=A0 <xsl:text>["</xsl:text>

=A0 <!-- displayed text -->

=A0 <xsl:choose>

=A0=A0=A0 <xsl:when test=3D"fi:label">

=A0=A0=A0=A0=A0 <xsl:value-of = select=3D"fi:label"/>

=A0=A0=A0 </xsl:when>

=A0=A0=A0 <xsl:otherwise>

=A0=A0=A0=A0=A0 <xsl:value-of = select=3D"@value"/>

=A0=A0=A0 </xsl:otherwise>

=A0 </xsl:choose>

=A0 <xsl:text>", "</xsl:text>

=A0 <!-- value -->

=A0 <xsl:value-of = select=3D"@value"/>

=A0 <xsl:text>"]</xsl:text>

=A0 <xsl:if test=3D"position() !=3D = last()">

=A0=A0=A0 <xsl:text>, &#10;</xsl:text>

=A0 </xsl:if>

</xsl:template>

 

</xsl:stylesheet>

 

Regards,

=A0=A0=A0=A0 = Chris

 

[ c h r i s t o f e r=A0=A0 d u t z = ]

 

IT-Berater

univativ GmbH & Co. = KG

Robert-Bosch-Str. 7, 64293 = Darmstadt

 

fon: 0 61 51 / 66 717 - 21

fax: 0 61 51 / 66 717 - = 29

email: = christofer.dutz@univativ.de

http://www.univativ.de

 

Darmstadt, Stuttgart, Karlsruhe, = D=FCsseldorf

 

------_=_NextPart_001_01C6E7C4.2959E000--