Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 82589 invoked from network); 14 Aug 2007 16:09:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Aug 2007 16:09:24 -0000 Received: (qmail 81067 invoked by uid 500); 14 Aug 2007 16:09:12 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 81032 invoked by uid 500); 14 Aug 2007 16:09:12 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 81021 invoked by uid 99); 14 Aug 2007 16:09:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2007 09:09:12 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-struts-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2007 16:09:08 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IKywl-0002Tn-19 for user@struts.apache.org; Tue, 14 Aug 2007 18:08:43 +0200 Received: from cpe0016b5ef7ea1-cm0014e88ef4b4.cpe.net.cable.rogers.com ([74.99.167.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Aug 2007 18:08:43 +0200 Received: from laurie by cpe0016b5ef7ea1-cm0014e88ef4b4.cpe.net.cable.rogers.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Aug 2007 18:08:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: user@struts.apache.org From: Laurie Harper Subject: Re: displaying items in different colors in a tag Date: Tue, 14 Aug 2007 12:08:31 -0400 Lines: 16 Message-ID: References: <3988.128.2.188.134.1187040104.squirrel@128.2.188.134> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cpe0016b5ef7ea1-cm0014e88ef4b4.cpe.net.cable.rogers.com User-Agent: Thunderbird 1.5.0.12 (Macintosh/20070509) In-Reply-To: <3988.128.2.188.134.1187040104.squirrel@128.2.188.134> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org Session A Mwamufiya wrote: > Hi, > > Is there a way, with the current version of struts 2, to use a conditional statement to color code elements that are displayed in a tag. By this, I mean that if I have items in my list that are >4, then they're red, and if they are <= 4, then they are blue. Obviously, this is not the conditional statement that I would want to use, but it gives an idea of what I'm looking for. So for the super creative minds out there, here's a small nutcracker ;). A quick look at the documentation for the tag [1] suggests that the short answer is 'not out of the box'. There are attributes for controlling the CSS class/styles for the containing SELECT element but not, as far as I can see, for the individual OPTIONs. If nothing else, though, you could write a custom template for this 'special use' and reference it through the template/templateDir attributes. L. [1] http://struts.apache.org/2.x/docs/select.html --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org