RE: bean:define tag

"Westfall Chad" <[email protected]>
Newsgroups gmane.comp.java.mvc.devel
Message-ID <996442E1FB8FD411B03F00025530F68E026B6D99@etrhutexc02.jdstg.deere.com>
The logic:present tag would work.  I would suggest however you send your
page an empty Collection instead of a null Collection.  If the Collection is
empty, it just won't iterate.

-----Original Message-----
From: Damm, Gary [mailto:[email protected]]
Sent: Monday, November 04, 2002 9:44 PM
To: [email protected]
Subject: [MVC-Programmers] bean:define tag


Question: How do I handle nulls with the bean:define tag?  I have a bean
with a collection attribute.  I use the define tag to put the collection
into the page scope so I can iterate over it.  But if the collection is
null I get a null pointer exception (of course).

Is there a way to use the existing taglibs that can deal with this
situation or do I have to extend the library (or resort to putting code
in my jsp)?
_______________________________________________
MVC-Programmers mailing list
[email protected]
http://www.netbean.net/mailman/listinfo/mvc-programmers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.