Re: bean:define tag

[email protected] 04 Nov 2002 19:41:44 -0800
Newsgroups gmane.comp.web.mvc.devel,gmane.comp.java.mvc.devel
Message-ID <[email protected]>
>>>>> "Gary" == Gary Damm <Damm> writes:

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

    Gary> Is there a way to use the existing taglibs that can deal with this
    Gary> situation or do I have to extend the library (or resort to putting code
    Gary> in my jsp)?

This would probably be better asked on the "struts-user" list.

You could wrap the code that calls "bean:define" (and the code that uses the
bean) with a "logic:present" tag.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[email protected]

_______________________________________________
MVC-Programmers mailing list
[email protected]
http://www.netbean.net/mailman/listinfo/mvc-programmers

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/JjlUgA/vN2EAA/kG8FAA/NhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/