Return-Path: Delivered-To: apmail-beehive-user-archive@www.apache.org Received: (qmail 24026 invoked from network); 12 Jul 2007 19:41:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jul 2007 19:41:02 -0000 Received: (qmail 80086 invoked by uid 500); 12 Jul 2007 19:41:04 -0000 Delivered-To: apmail-beehive-user-archive@beehive.apache.org Received: (qmail 79803 invoked by uid 500); 12 Jul 2007 19:41:04 -0000 Mailing-List: contact user-help@beehive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Users" Delivered-To: mailing list user@beehive.apache.org Received: (qmail 79786 invoked by uid 99); 12 Jul 2007 19:41:04 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2007 12:41:04 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=DNS_FROM_AHBL_RHSBL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ekoneil@gmail.com designates 64.233.184.232 as permitted sender) Received: from [64.233.184.232] (HELO wr-out-0506.google.com) (64.233.184.232) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jul 2007 12:41:00 -0700 Received: by wr-out-0506.google.com with SMTP id l58so223711wrl for ; Thu, 12 Jul 2007 12:40:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qx75jIbtFX941OPe7LBOgey+iojRqlsMJTY1Gd8XoDlft2DXMiY/LCnshgr0+UQ5MtamTowNYrUiNC86QWPplqxQvVpmxDmF2qz1dys0O+J9PGqyyhWLIgC2sFeupCdlPq6l6O7Q3lbmvpt0N1oUa5YBjV8d1pPl5HV41D0Q+bM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JobKYo6jUdSIx4cttCz2EeAOwwBQgitNtaA9YTLpbqL57vU36KVff2uXNgs7KTr7PfcFngYGlLY0vjwrdMm/sBLghzS6xgecotwY4wnD9c3cC8rNzXu8Nf/0PLpdjIf1JzFq2rKKWltc+k+Jt/cmGfR2h4FlDg9KIE2zKDOy0hU= Received: by 10.114.27.20 with SMTP id a20mr899313waa.1184269239151; Thu, 12 Jul 2007 12:40:39 -0700 (PDT) Received: by 10.114.52.9 with HTTP; Thu, 12 Jul 2007 12:40:39 -0700 (PDT) Message-ID: Date: Thu, 12 Jul 2007 13:40:39 -0600 From: "Eddie O'Neil" To: "Beehive Users" Subject: Re: Data Grid with null rows In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1BA9B44399604F4C983B85483E1F92E54B058C@repbex02.amer.bea.com> X-Virus-Checked: Checked by ClamAV on apache.org Ben-- Today, there's not a way to suppress null items in a data set as there is with the Repeater. This is definitely an oversight; ignoreNulls should be part of the data grid. Obviously, I don't know the structure of your application, but it might be possible to wrap the ArrayList in a List facade that just ignores null items. Please add an enhancement request to support some kind of null supression. Thanks. Cheers, Eddie On 7/12/07, Burgess, Benjamin wrote: > Thanks for the link. This will help make the null looks prettier when > printed, but it wont prevent their iteration. > > What I am really looking for is an "ignoreNulls=true" like there is on > the netui-data:repeater tag. Unfortunately, it does not exist for the > datagrid tag. > > I looked at the code, and it would take a little bit of refactoring of > some of the classes which use code like the following: > > int index = dataGridModel.getCurrentIndex(); > if(index % 2 == 0) > trState.styleClass = styleModel.getRowClass(); > else trState.styleClass = > styleModel.getAltRowClass(); > > This is because, if a NULL element is ignored, the index would still be > incremented, but the odd/even row rendering should keep track of which > style to use next. Basically, the logic of keeping track of odd/even > style class needs to be separated from the actual index into the > datasource. > > Ben > > -----Original Message----- > From: Scott Hammer [mailto:shammer@bea.com] > Sent: Wednesday, July 11, 2007 2:30 PM > To: Burgess, Benjamin; Beehive Users > Subject: RE: Data Grid with null rows > > Ben, > > If you are using BEA WebLogic, the weblogic.xml deployment descriptor > has a setting to print null as the empty string. Look for "print-nulls" > under the following URL: > > http://e-docs.bea.com/wls/docs100/webapp/weblogic_xml.html#wp1038491 > > If not using WebLogic, you will likely need add logic to check for null. > > HTH, > Scott > > -----Original Message----- > From: Burgess, Benjamin [mailto:BBurgess@tiaa-cref.org] > Sent: Wednesday, July 11, 2007 11:47 AM > To: user@beehive.apache.org > Subject: Data Grid with null rows > > I am using a netui-data:dataGrid tag to iterate over an ArrayList object > which has some null elements in it. This results in some of the rows > printing "null" to the screen in its columns. Is there a way to tell > the dataGrid to ignore null elements when iterating? I could use the > renderRows="false" on the "rows" tag, and then put an if around a "row" > tag inside, but this makes the odd even row counter get messed up. Is > there some other way? Maybe filters? > > > > Ben > > > ************************************************************************ > ******************** > This message, including any attachments, contains confidential > information intended for a specific individual and purpose, and is > protected by law. If you are not the intended recipient, please contact > the sender immediately by reply e-mail and destroy all copies. > You are hereby notified that any disclosure, copying, or distribution of > this message, or the taking of any action based on it, is strictly > prohibited. > > TIAA-CREF > ************************************************************************ > ******************** > > Notice: This email message, together with any attachments, may contain > information of BEA Systems, Inc., its subsidiaries and affiliated > entities, that may be confidential, proprietary, copyrighted and/or > legally privileged, and is intended solely for the use of the individual > or entity named in this message. If you are not the intended recipient, > and have received this message in error, please immediately return this > by email and then delete it. > > ******************************************************************************************** > This message, including any attachments, contains confidential information intended > for a specific individual and purpose, and is protected by law. If you are not the intended > recipient, please contact the sender immediately by reply e-mail and destroy all copies. > You are hereby notified that any disclosure, copying, or distribution of this message, or > the taking of any action based on it, is strictly prohibited. > > TIAA-CREF > ******************************************************************************************** >