<logic:notEmpty name="history" property="agent">
        Evaluate if not null;   
</logic:notEmpty>

>From struts api ref:
Evaluate the nested body content of this tag if the requested variable is
neither null, nor an empty string, nor an empty java.util.Collection (tested by
the .isEmpty() method on the java.util.Collection interface).












-----Original Message-----
From: Mick Knutson [mailto:[EMAIL PROTECTED] 
Sent: June 24, 2003 4:04 PM
To: [EMAIL PROTECTED]
Subject: RE: Checking for a null property


But doesn't the present tag just check whether the property is present, and 
not if it is null or not? I was having some strange actions with this.



---
Thanks...
Mick Knutson
---





>From: "Varun Garg" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Checking for a null property
>Date: Tue, 24 Jun 2003 17:00:28 -0500
>
><logic:present name="history" property="agent">
>       <bean:write name="history" property="agent.fullName" />
></logic:present>
>
>
>-----Original Message-----
>From: Jindal, Ashwini [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, June 24, 2003 4:57 PM
>To: [EMAIL PROTECTED]
>Subject: Checking for a null property
>Importance: High
>
>
>Anyone,
>
>Can anyone please help me with the following situation?
>
>I am trying to display the Agent's full Name. Now it works fine as long
>as the Agent has a valid full Name. As soon as Agent is null, I get a
>Null Pointer. I want to check
>
>       <bean:write name="history" property="agent.fullName" />
>
>       if the agent is null
>               then do something
>
>Can please tell me how I can make this check?
>
>Thank you,
>...AJ
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


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


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

Reply via email to