Maybe you should use <logic:greaterThan name="resView"
property="personBirthDate" value="">.
----- Original Message -----
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, October 08, 2002 1:46 PM
Subject: Do something when null _or_ blank?


>
> I just wrote this:
>
> <logic:notEqual name="resView" property="personBirthDate" value="">
>   <bean:write name="resView" property="personBirthDate" />
> </logic:notEqual>
> <logic:equal name="resView" property="personBirthDate" value="">
>   --
> </logic:equal>
>
> What I really need is to print out the birthDate property if it's not
blank
> and not null, otherwise, print the '--'.  Can I combine notEqual and
> present? [implied question:  HOW?]
>
> Also, the above seems to me the equivalent of writing:
>
> if ( something.equals("") )
>   //do one thing;
>
> if ( !something.equals("") )
>   System.out.println(something);
>
> which is downright PAINFUL to look at.
>
> I tried to look at the generated JSP, but I couldn't find the translation
of
> the logic:equal/notEqual tags in there.  I guess I just want to know that
> the code isn't calling resView.getPersonBirthDate() multiple times.  Can I
> rest assured that the generated code is as efficient as possible?
>
> Any suggestions appreciated!
>
> --
> Wendy Smoak
> http://sourceforge.net/projects/unidbtags
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to