RE: Struts Dilemma

2003-11-06 Thread Khalid K.
Great...then I stand corrected, and I'll cleanup some of my code :) Khalid -Original Message- From: Brian Lee [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 7:58 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Struts Dilemma You don't need the g

RE: Struts Dilemma

2003-11-06 Thread Brian Lee
uts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> 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

RE: Struts Dilemma

2003-11-06 Thread Khalid K.
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;

Re: Struts Dilemma

2003-11-06 Thread mradhakrishnan
Hi JSTL logical operators seems to be a solution. Mohan > 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 > getIn

RE: Struts Dilemma

2003-11-06 Thread Greg Hess
When I create a form exposing a boolean property I only write a; public void setInactive(boolean flag){} public boolean isInactive(){} The inactive form input will have the value "true" and "false" properly handled, I know it also supports other forms of true and false but I have only tested "

RE: Struts Dilemma

2003-11-06 Thread Jain, Vikas
You don't have to have a string method to convert boolean <--> string. Just have boolean in form and let struts handle it. -Original Message- From: Srinivas Gunturu [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 11:30 AM Subject: Struts Dilemma Often when writing a bean fo

RE: Struts Dilemma

2003-11-06 Thread Srinivas Gunturu
I guess this will work for form beans. What if the flag I am trying to query is not in the form bean but is in a session bean? Would you do the same? This is where I am having hardtime to create these equivalent methods that return string while rest of my business delegates use boolean method

RE: Struts Dilemma

2003-11-06 Thread Joe at Team345
I think the best way to avoid this is to always use Strings and only Strings for all form values (except Collections). Then your action class can convert to/from the desired type when it creates the transfer object to pass to the business delegate. If you combine this approach with the struts val

RE: Struts Dilemma

2003-11-06 Thread Appel, Jeremy D
Try the or tags... -Original Message- From: Srinivas Gunturu [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 12:30 PM 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 prop