Return-Path: X-Original-To: apmail-pivot-user-archive@www.apache.org Delivered-To: apmail-pivot-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C33596996 for ; Wed, 22 Jun 2011 22:12:33 +0000 (UTC) Received: (qmail 79406 invoked by uid 500); 22 Jun 2011 22:12:33 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 79331 invoked by uid 500); 22 Jun 2011 22:12:33 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 79173 invoked by uid 99); 22 Jun 2011 22:12:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 22:12:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.159.29.9] (HELO mailstore05.sysedata.no) (195.159.29.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 22:12:24 +0000 Received: from [95.34.243.130] (helo=[10.0.1.190]) by mailstore05.sysedata.no with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QZVeW-0000Q9-Mn for user@pivot.apache.org; Thu, 23 Jun 2011 00:12:04 +0200 Message-ID: <4E0268B4.5030305@sysedata.no> Date: Thu, 23 Jun 2011 00:12:04 +0200 From: Edvin Syse User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nb-NO; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: user@pivot.apache.org Subject: Re: No support for Map in BeanAdapter? References: <4E0241A4.3010907@sysedata.no> <9D48B54E-CCCF-4876-8E3B-28218C56580D@verizon.net> <4E02476E.1010105@sysedata.no> <4E024BB7.7050304@sysedata.no> <4E0255B2.9080900@sysedata.no> <4E025C7E.7060608@sysedata.no> <01CCFA94-C8A8-40F6-8605-5A59A3D19C04@verizon.net> <4E02627B.8020908@sysedata.no> <5A3E1415-39A6-4602-A33B-1373596E88B9@verizon.net> In-Reply-To: <5A3E1415-39A6-4602-A33B-1373596E88B9@verizon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Den 22.06.2011 23:58, skrev Greg Brown: > Ah, I see. java.util.Map is not supported. You need to use the Pivot collections with BeanAdapter. Did you try wrapping your map in a MapAdapter (or simply using a Pivot Map such as HashMap)? I don't see how I can possibly do that, since I can't (and shouldn't) change the domain object to hold an instance of Pivot Map. Example domain object: public class Person { String name; java.util.Map properties = new java.util.HashMap(); } So I have a list of these set as the tableData for a TableView. Each Person contains another map inside properties, and I want to retrieve a value from that map to show in the TableView. Here is how one could manually construct one of the Person objects: Person p = new Person(); p.name = "John Doe" java.util.Map data = new java.util.HashMap(); data.put("group", "My Group") p.properties.put("data", "data") My column is: I can't see how I can make this work without using an intermediary domain object, or simply adding support for java.util.Map to BeanAdapter. Do you think adding support for java.util.Map to BeanAdapter has little value? By the way, the patch is trivial, and it works great :) -- Edvin