You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by William Jaynes <wj...@mediaone.net> on 2000/12/06 16:17:03 UTC
bean.WriteTag suggestion
I notice that bean.WriteTag will output nothing if getting the property of the
specified bean returns null. If getting the bean itself returns a null, however,
an exception is thrown. I'd like to suggest that it would be more consistent if
either case causes output to be nothing.
Will
Re: bean.WriteTag suggestion
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
William Jaynes wrote:
> I notice that bean.WriteTag will output nothing if getting the property of the
> specified bean returns null. If getting the bean itself returns a null, however,
> an exception is thrown. I'd like to suggest that it would be more consistent if
> either case causes output to be nothing.
>
I can see the consistency argument here. I can also see a consistency argument with
the way that missing beans are handled in all of the other tags in the library.
Therefore, I'm adding a new "ignore" attribute to <bean:write> that lets you select
the "just output nothing" behavior if you want it. The default will still be to
throw an exception
>
> Will
Craig