Re: REPOST: HOW TO: check for null property value

2001-05-12 Thread Ted Husted

Try logic:present name=myBean property=item1 

Matthew O'Haire wrote:
 
 How do I use the logic tags to check for a null property value on a bean and
 include/exclude HTML segment on that basis?
 
 I have a bean in the session that holds references to other beans.  If the
 references are not-null then I need to display some info about them.  I've
 tried using logic:notEqual property=myBean.item1 value=null and
 logic:present name=myBean.item1 but to no avail.
 
 Can anyone help me out here.
 Thanks.
 
 Matthew O'Haire
 Technical Manager
 email: [EMAIL PROTECTED]
 
 IT Project Services  Solutions
 · Development · Integration · Support · People ·
 44 Benson Street, Toowong, Queensland, Australia. 4066
 ph: +61-7-3870 7070
 fx: +61-7-3870 3480
 www: http://www.trysoft.com/
 e-mail: [EMAIL PROTECTED]
 
 Please Note:
 This document (including attachments) is only intended for the addressee/s
 and may contain privileged or confidential information. Unauthorised use,
 copying or distribution of the document or any part of its contents, is
 prohibited. If you receive this e-mail in error please notify us by return
 e-mail or telephone.
 Any views expressed in this Communication are those of the individual
 sender, except where the sender specifically states them to be the views of
 Trysoft Corporation Limited.
 Except as required at law, Trysoft Corporation Limited does not represent,
 warrant and/or guarantee that the integrity of this communication has been
 maintained nor that the communication is free of errors, virus, interception
 or interference.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



REPOST: HOW TO: check for null property value

2001-03-20 Thread Matthew O'Haire

How do I use the logic tags to check for a null property value on a bean and
include/exclude HTML segment on that basis?

I have a bean in the session that holds references to other beans.  If the
references are not-null then I need to display some info about them.  I've
tried using logic:notEqual property="myBean.item1" value="null" and
logic:present name="myBean.item1 but to no avail.

Can anyone help me out here.
Thanks.


Matthew O'Haire
Technical Manager 
email: [EMAIL PROTECTED] 

IT Project Services  Solutions 
 Development  Integration  Support  People  
44 Benson Street, Toowong, Queensland, Australia. 4066 
ph: +61-7-3870 7070 
fx: +61-7-3870 3480 
www: http://www.trysoft.com/ 
e-mail: [EMAIL PROTECTED] 

Please Note:
This document (including attachments) is only intended for the addressee/s
and may contain privileged or confidential information. Unauthorised use,
copying or distribution of the document or any part of its contents, is
prohibited. If you receive this e-mail in error please notify us by return
e-mail or telephone. 
Any views expressed in this Communication are those of the individual
sender, except where the sender specifically states them to be the views of
Trysoft Corporation Limited. 
Except as required at law, Trysoft Corporation Limited does not represent,
warrant and/or guarantee that the integrity of this communication has been
maintained nor that the communication is free of errors, virus, interception
or interference.






Re: REPOST: HOW TO: check for null property value

2001-03-20 Thread Craig R. McClanahan



On Wed, 21 Mar 2001, Matthew O'Haire wrote:

 How do I use the logic tags to check for a null property value on a bean and
 include/exclude HTML segment on that basis?
 
 I have a bean in the session that holds references to other beans.  If the
 references are not-null then I need to display some info about them.  I've
 tried using logic:notEqual property="myBean.item1" value="null" and
 logic:present name="myBean.item1 but to no avail.
 

The first thing you tried would compare to the literal string "null",
which is not what you want.  The second test is invalid because the nested
property syntax works only on the "property" attribute, not "name".

If "item1" is the name of your bean property that might return a null
value, try this:

logic:present name="myBean" property="item1"/
  ... the value is not null ...
/logic:present

or

logic:notPresent name="myBean" property="item1"/
  ... the value is null ...
/logic:notPresent


 Can anyone help me out here.
 Thanks.
 
 
 Matthew O'Haire
 Technical Manager 
 email: [EMAIL PROTECTED] 
 

Craig McClanahan