Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 59486 invoked from network); 31 Aug 2006 09:11:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Aug 2006 09:11:35 -0000 Received: (qmail 91586 invoked by uid 500); 31 Aug 2006 09:11:28 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 90933 invoked by uid 500); 31 Aug 2006 09:11:26 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 90921 invoked by uid 99); 31 Aug 2006 09:11:26 -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 [213.133.33.30] (HELO mailrelay.is.nl) (213.133.33.30) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Aug 2006 02:11:26 -0700 Received: from [213.133.51.241] (HELO hai01.hippo.local) by mailrelay.is.nl (CommuniGate Pro SMTP 4.3.5) with ESMTP id 22928240 for users@cocoon.apache.org; Thu, 31 Aug 2006 11:10:39 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Converting string to array in jxtemplategenerator Date: Thu, 31 Aug 2006 11:01:09 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Converting string to array in jxtemplategenerator Thread-Index: AcbM1wzFsa7xBwkHQyu4NzC7B/A+OAAA9rgA From: "Ard Schrijvers" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Alberto, > I need to convert a string (words delimited with commas) in something=20 > that "jx:forEach" can iterates. > I found a nice example in documentation=20 > (http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html). >=20 > > > > > items=3D"${java.util.StringTokenizer(items, delims)}"> > > > >=20 > > letter =3D ${letter}
>
I also have had this problem. See this thread = http://marc.theaimsgroup.com/?l=3Dxml-cocoon-dev&m=3D113835963721689&w=3D= 2 about your problem. It used to work, but not in cocoon-2.1.8 in this = way anymore. I am not sure about other versions: which one do you use? Anyway, I solved it by going through flow. Are you familiar with flow? = Do the java.util.StringTokenizer part in flow, and pass the variable = from flow to your jxtemplate. Then you can use the jx:forEach on this = object. Regards Ard >=20 > I try it and something simpler: >=20 > items=3D"${java.util.StringTokenizer('name,lastname',',')}"=20 > varStatus=3D"status"> > > ${field} > > >=20 >=20 > Both doesn't work; field variable has never a value. >=20 > What's wrong? Is there another way? >=20 > Alberto >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org