Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@www.apache.org Received: (qmail 83989 invoked from network); 7 Nov 2003 03:58:00 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Nov 2003 03:58:00 -0000 Received: (qmail 77887 invoked by uid 500); 7 Nov 2003 03:57:24 -0000 Delivered-To: apmail-jakarta-struts-user-archive@jakarta.apache.org Received: (qmail 77844 invoked by uid 500); 7 Nov 2003 03:57:24 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 77830 invoked from network); 7 Nov 2003 03:57:23 -0000 Received: from unknown (HELO hotmail.com) (64.4.9.4) by daedalus.apache.org with SMTP; 7 Nov 2003 03:57:23 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 6 Nov 2003 19:57:33 -0800 Received: from 12.7.85.10 by lw9fd.law9.hotmail.msn.com with HTTP; Fri, 07 Nov 2003 03:57:33 GMT X-Originating-IP: [12.7.85.10] X-Originating-Email: [brian_a_lee@hotmail.com] From: "Brian Lee" To: struts-user@jakarta.apache.org Cc: sxg1127@bjc.org Bcc: Subject: RE: Struts Dilemma Date: Thu, 06 Nov 2003 22:57:33 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 07 Nov 2003 03:57:33.0717 (UTC) FILETIME=[461A5C50:01C3A4E3] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N You don't need the getIsActive method in your bean. If you have isActive, you can use the line: According to the bean spec any boolean attributes should use "isFoo" instead of "getFoo". BAL >From: "Khalid K." >Reply-To: "Struts Users Mailing List" >To: "'Struts Users Mailing List'" >Subject: RE: Struts Dilemma >Date: Thu, 6 Nov 2003 19:48:53 -0800 > >I do the following: > >// in the bean >Public boolean isActive() { > if (blah) > return true; > return false; >} >// if I know that this method will be used in jsp, I also write the >following: >Public boolean getIsActive() { > if (isActive()) > return true; > return false; >} > >// in jsp > > printout whatever... > > >It works... > >Khalid > > >-----Original Message----- >From: Srinivas Gunturu [mailto:sxg1127@bjc.org] >Sent: Thursday, November 06, 2003 9:30 AM >Subject: Struts Dilemma > > >Often when writing a bean for use by a tag, I seem to be writing a >equivalent method that returns a string value for a boolean property. > >For example: > >If I mean to pass a boolean property isInactive, I am also writing a >getInactiveFlag which returns "N" or "Y" based on isInactive. > >I use inactiveFlag in my tag definition and inside my tag I check for >"Y" or "N". > >Am I totally missing something or is there a better way to do this? > >TIA > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: struts-user-help@jakarta.apache.org > > > >--- >Incoming mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.536 / Virus Database: 331 - Release Date: 11/3/2003 > > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.536 / Virus Database: 331 - Release Date: 11/3/2003 > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: struts-user-help@jakarta.apache.org > _________________________________________________________________ Frustrated with dial-up? Get high-speed for as low as $26.95. https://broadband.msn.com (Prices may vary by service area.) --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org