You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Jindal, Ashwini" <aj...@ebay.com> on 2003/06/24 23:57:14 UTC
Checking for a null property
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Checking for a null property
Posted by Varun Garg <va...@yahoo.com>.
<logic:present name="history" property="agent">
<bean:write name="history" property="agent.fullName" />
</logic:present>
-----Original Message-----
From: Jindal, Ashwini [mailto:ajindal@ebay.com]
Sent: Tuesday, June 24, 2003 4:57 PM
To: struts-user@jakarta.apache.org
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org