Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 45033 invoked from network); 4 Jan 2008 10:27:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jan 2008 10:27:22 -0000 Received: (qmail 1552 invoked by uid 500); 4 Jan 2008 10:27:08 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 1474 invoked by uid 500); 4 Jan 2008 10:27:08 -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 1463 invoked by uid 99); 4 Jan 2008 10:27:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2008 02:27:08 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.247.154.104] (HELO swip.net) (212.247.154.104) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jan 2008 10:26:56 +0000 X-Cloudmark-Score: 0.000000 [] Received: from [213.103.137.200] (account cxu-8cd-hm6@tele2.ch HELO aae63.lan) by mailfe04.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 754177532 for users@cocoon.apache.org; Fri, 04 Jan 2008 11:26:48 +0100 Message-ID: <477E09E0.40902@weitling.net> Date: Fri, 04 Jan 2008 11:26:40 +0100 From: Dev at weitling User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: HashMap in repeater binding via javascript References: <477D78BE.9090606@weitling.net> <477DF53C.5060502@gmx.at> In-Reply-To: <477DF53C.5060502@gmx.at> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Harald, thanks for your help, but it I'm sorry to say it doesn't match my problem. An example: Map locales = new HashMap(); locales.put("de","deutsch"); locales.put("en","english"); locales.put("fr","francais"); I now want a repeater binding iterating over the keys with presenting the keys with their values in the template, something like (doesn't work!): Alas, Map defines methods keySet() instead of getKeySet(). entrySet() returns a Set with MapEntry-objects with getKey()/getValue(), but it's name should be getEntrySet(). *Argh* So I have to provide a custom binding via Javascript or Java. :-? Florian Harald Entner wrote: > Hi Florian, > > maybe this piece of information can be useful for you. > > We have a bean with a property stringObjects, > which is declared as a Map to store various string objects. > > the xdoclet definition: > > @hibernate.map lazy="true" cascade="all" inverse="false" > table="PepProduct_stringobjects" > @hibernate.key column="UID" > @hibernate.map-key type="string" column="name" > @hibernate.element type="string" column="element" length="2000" > > and the binding: > > path="stringObjects[@name='phCalculation']" direction="both"/> > > this configuration works well.Keep in mind that the @name attribute > has to match > the @hibernate.map-key. > > Hope it helps, > > regards, Harald > > > > > > Dev at weitling schrieb: >> Hi folks, >> >> I'm getting nuts on this problem: >> I have a HashMap which should be the bean for a repeater with the keys >> as identity on each repeater row. Because JXPath relies on the >> get-/set-naming-scheme but Sun didn't provide it for their collection >> classes I can't use it the normal way. >> Subclassing HashMap for providing the getter-methods on my own doesn't >> work because I'm using Hibernate (and therefore the Map-interface). >> So I try to use fb:javascript withing the repeater's binding. But >> information is very sparse and not really helpful. >> >> Any experiences out there? >> Florian >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >> For additional commands, e-mail: users-help@cocoon.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org