Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 54281 invoked from network); 28 Feb 2007 17:56:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2007 17:56:19 -0000 Received: (qmail 34647 invoked by uid 500); 28 Feb 2007 17:56:27 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 34357 invoked by uid 500); 28 Feb 2007 17:56:26 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 34346 invoked by uid 99); 28 Feb 2007 17:56:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 09:56:26 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Feb 2007 09:56:17 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 13DC5714044 for ; Wed, 28 Feb 2007 09:55:57 -0800 (PST) Message-ID: <3124664.1172685357078.JavaMail.jira@brutus> Date: Wed, 28 Feb 2007 09:55:57 -0800 (PST) From: "Paul Palaszewski (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Created: (TOMAHAWK-913) Layout of DataTable with groups + alternating rowStyles looks really bad MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Layout of DataTable with groups + alternating rowStyles looks really bad ------------------------------------------------------------------------ Key: TOMAHAWK-913 URL: https://issues.apache.org/jira/browse/TOMAHAWK-913 Project: MyFaces Tomahawk Issue Type: Improvement Components: Extended Datatable Affects Versions: 1.1.3, 1.1.5-SNAPSHOT Reporter: Paul Palaszewski Priority: Minor Hi! I'm using Extended Data Tables and wanted to use the column's groupBy. Now all normal tables of this project have rowStyles with alternating row-background-colors, so I tried to apply them also on the grouped data. It looks really bad, since the generated row-span messes up the layout. The rowGroupStyle does not help - it's only useable as group separator style, therefor I think the name is a litte bit confusing - but that's another issue. I suggest, that the rowStyles should work on groups rather than on rows. Tried to patch HtmlTableRenderer accordingly and works fine for me: HtmlTableRenderer#createColumnInfos [..] int currentRowSpan=-1; int currentRowInfoIndex=-1; int groupCount = 0; // added by PP TableContext tableContext=htmlDataTable.getTableContext(); [..] if(groupEndReached) { currentRowSpan=0; groupEndReached = false; groupCount++; // added by PP } rowInfo.setGroupIndex(groupCount); // added by PP tableContext.getRowInfos().add(rowInfo); HtmlTableRenderer#renderRowStyle String rowStyleClass; String rowStyle; if (uiData instanceof HtmlDataTable) { HtmlDataTable datatable = (HtmlDataTable) uiData; rowStyleClass = datatable.getRowStyleClass(); rowStyle = datatable.getRowStyle(); // added by PP TableContext tableContext = datatable.getTableContext(); if (tableContext != null && tableContext.getRowInfos() != null && tableContext.getRowInfos().size() > rowStyleIndex) { RowInfo rowInfo = (RowInfo) tableContext.getRowInfos().get(rowStyleIndex); if (rowInfo.getGroupIndex() >= 0) rowStyleIndex = rowInfo.getGroupIndex(); } RowInfo added private int _groupIndex = -1; public int getGroupIndex() { return _groupIndex; } public void setGroupIndex(int groupIndex) { _groupIndex = groupIndex; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.