Return-Path: Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 34007 invoked by uid 500); 6 Aug 2003 18:43:05 -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 33939 invoked from network); 6 Aug 2003 18:43:04 -0000 Received: from out004pub.verizon.net (HELO out004.verizon.net) (206.46.170.142) by daedalus.apache.org with SMTP; 6 Aug 2003 18:43:04 -0000 Received: from verizon.net ([4.40.124.33]) by out004.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030806184308.ZWEA14849.out004.verizon.net@verizon.net> for ; Wed, 6 Aug 2003 13:43:08 -0500 Message-ID: <3F314C36.2000200@verizon.net> Date: Wed, 06 Aug 2003 11:43:02 -0700 From: Christopher Oliver User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Garbage or The Quest for the Perfect Template Language References: <3F2998D3.9060800@cbim.it> <3F2A0099.2070407@verizon.net> <3F2A1A8A.8060609@cbim.it> <3F2A1F06.3000503@anyware-tech.com> <3F2FC428.5030007@cbim.it> <3F2FE9AD.6010006@cbim.it> <3F2FEC7C.6040504@cbim.it> <3F2FF670.90209@verizon.net> <3F30A9A0.5010608@cbim.it> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out004.verizon.net from [4.40.124.33] at Wed, 6 Aug 2003 13:43:08 -0500 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N That's a problem with JXTemplateGenerator: it returns a raw java.lang.Class object from "java.util.Locale" which doesn't have a property "ITALIAN". I'll try to fix that so it returns a wrapped Class object that shows static fields as properties as in JavaScript. In general, I think you're right, though, JXTemplate generator requires additional tags to support Number, Date, and Message formatting. JSTL has such tags. If I have time I'll try to add them. Regards, Chris Ugo Cei wrote: > Christopher Oliver wrote: > >> By the way JXTemplateGenerator adds the capability to call Java >> constructors to Jexl, so you can also do this: >> >> > value='${java.text.SimpleDateFormat("dd/MM/yyyy").format(someDate)}'/> > > > OK, this works: > > ${java.text.SimpleDateFormat("dd/MM/yyyy").format(date)} > > But this does not: > > ${java.text.SimpleDateFormat("dd/MM/yyyy",java.util.Locale.ITALIAN).format(date)} > > > and gives the following error: > > The choice of Java constructor java.text.SimpleDateFormat matching > JavaScript argument types (string,null) is ambiguous; candidate > constructors are: (java.lang.String,java.text.DateFormatSymbols), > (java.lang.String,java.util.Locale) > > Problem with static members? > > Ugo >