Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 24706 invoked from network); 30 May 2007 14:10:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2007 14:10:53 -0000 Received: (qmail 36343 invoked by uid 500); 30 May 2007 14:10:47 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 36316 invoked by uid 500); 30 May 2007 14:10:47 -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 36302 invoked by uid 99); 30 May 2007 14:10:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 May 2007 07:10:47 -0700 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 [220.233.0.10] (HELO ef.exetel.com.au) (220.233.0.10) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 30 May 2007 07:10:41 -0700 Received: (qmail 8213 invoked by uid 508); 30 May 2007 14:10:16 -0000 Received: from blueskyminds.com.au (HELO ?192.168.1.150?) (jeromy@blueskyminds.com.au@220.233.11.162) by ef.exetel.com.au with SMTP; 30 May 2007 14:10:16 -0000 Message-ID: <465D85CE.6080409@blueskyminds.com.au> Date: Thu, 31 May 2007 00:10:22 +1000 From: Jeromy Evans Organization: Blue Sky Minds Pty Ltd User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: [s2] If Test Conditions References: <73896C9F08D68D438FCCBA8005C671E70804C718@C3EXCHANGE.corp.premierinc.com> In-Reply-To: <73896C9F08D68D438FCCBA8005C671E70804C718@C3EXCHANGE.corp.premierinc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org The problem is that displaytag places the current row in the pageContext but none of your expressions are addressing it. I tend to just use JSTL within displaytag tables as its much easier to access the current row. I also tend to add getters to my bean to simplify the expressions instead of hardcoding it in the JSP. eg. isNew() Anyway, this is a struts2 way to access it: I am having a devil of a time getting a simple if test condition to work > properly. > > Here is the jist of what I am trying to do: > > > > > fieldValue="${idContract.id}"/> > > >  ${idContract.status}  > > > titleKey="label.contractNumber" /> > titleKey="label.contractStatus" /> > titleKey="label.authFacilities" /> > > > I have tried the following and do not seem to be able to get any of them > to work: > "${idContract.status}=='NEW'" > '${idContract.status}=="NEW"' > "%{idContract.status}=='NEW'" > "${idContract.status=='NEW'}" > "%{idContract.status=='NEW'}" > "idContract.status=='NEW'" > "#idContract.status=='NEW'" > > And a host of others that I cannot recall. > > Does anyone happen to know the correct syntax? I am getting tired of > guessing and cannot seem to make rhyme or reason out of the syntax rules > :-) > > Thanks in advance! > > ----------------------------------------- > ***Note:The information contained in this message may be privileged > and confidential and protected from disclosure. If the reader of > this message is not the intended recipient, or an employee or agent > responsible for delivering this message to the intended recipient, > you are hereby notified that any dissemination, distribution or > copying of this communication is strictly prohibited. If you have > received this communication in error, please notify the Sender > immediately by replying to the message and deleting it from your > computer. Thank you. Premier Inc. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org