From adffaces-user-return-1337-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Thu Nov 02 08:24:10 2006 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 72123 invoked from network); 2 Nov 2006 08:24:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Nov 2006 08:24:09 -0000 Received: (qmail 4901 invoked by uid 500); 2 Nov 2006 08:24:20 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 4879 invoked by uid 500); 2 Nov 2006 08:24:20 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 4870 invoked by uid 99); 2 Nov 2006 08:24:20 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 00:24:20 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [64.41.126.131] (HELO smtpauth00.csee.siteprotect.com) (64.41.126.131) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 00:24:06 -0800 Received: from [192.168.0.61] (LNeuilly-152-23-77-40.w217-128.abo.wanadoo.fr [217.128.193.40]) by smtpauth00.csee.siteprotect.com (Postfix) with ESMTP id 8808A32C00C for ; Thu, 2 Nov 2006 02:23:28 -0600 (CST) Message-ID: <4549AB0E.1020103@sunopsis.com> Date: Thu, 02 Nov 2006 09:23:42 +0100 From: Arnaud MERGEY User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: adffaces-user@incubator.apache.org Subject: Re: Table with dynamic number of columns References: <820E9D2DE5261D45B6D5E9BFF0984C66ACDF50@qxvcexch01.ad.quovadx.com> In-Reply-To: <820E9D2DE5261D45B6D5E9BFF0984C66ACDF50@qxvcexch01.ad.quovadx.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I don't use facelet, but "classic" JSP with Trinidad and tr:forEach works fine for my pages with table and dynamic columns try something like this Hi, > > > > Is it possible to create a tr:table with a dynamic number of columns? I > have a table backed by a list of objects A, in the typical way. Each row > pulls out some fixed properties of A, but A also contains a list of B's. > I want each of the B's to be some additional columns. Don't worry, I can > guarantee that all the A's have the same number of B's, so each row of > the table will have the same number of columns, but I don't know what > that number is before runtime. > > > > I tried the iterator tag, but you aren't allowed to put it directly > under . I tried making a column tag that contained an iterator > and N sub-columns. The results were unpredictable and I got a > ArrayIndexOutOfBounds. Before I looked too deeply into that, maybe I'm > just not supposed to do that. I don't know. > > > > Another option might be to put the maximum number of columns in the > table, and set rendered=false for the ones I won't use. But that's a lot > for EL. The second column would have rendered="#{row.list.size() >= 2}", > which I don't even think is allowed in EL. > > > > Options? > > > > Thanks for any help you can offer. > > > > Dan > > >