--- "Jindal, Ashwini" <[EMAIL PROTECTED]> wrote: > Affan, > > Where does this C: tag come from???
The c tags are part of the JSTL. David > > ...AJ > > -----Original Message----- > From: Affan Qureshi [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2003 4:18 AM > To: Struts Users Mailing List > Subject: Re: Checking for a null property > > > Save yourself all the trouble and use <c:if test="!empty > collection">....</c:if> > Affan > ----- Original Message ----- > From: "Varun Garg" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Wednesday, June 25, 2003 3:24 AM > Subject: RE: Checking for a null property > > > > I think you can use empty also, but present also works for me. > > > > The documentation also suggests that > > property - Checks for the existence of a non-null property value, > > returned by a property getter method on the JSP bean (in any scope) > that > > is specified by the name attribute. Property references can be simple, > > nested, and/or indexed. > > > > I have used the empty more for collections to make sure there is > > something in there. > > > > Varun > > > > > > -----Original Message----- > > From: Mick Knutson [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, June 24, 2003 5: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] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]