struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <craig...@apache.org>
Subject Re: Where dose JSP works in JSF request lifecycle?
Date Wed, 03 May 2006 21:15:40 GMT
On 5/3/06, 王曾wang_zeng <wangzengverycool@gmail.com> wrote:
>
> Oh,yeah,I see, that's why you use "new" keyword in the code above.
>
> >private HtmlOutputText dynamicText = new HtmlOutputText();
>
> Then,I have a pretty weird idea. If you dosen't new a HtmlOutputText,will
> there be a NullpointerException popped up in this case?


No ... if the getter method returns null, the tag handler will create a new
component instance, just as if you hadn't declared a binding attribute ...
but then it will call the setter so your backing bean still has access to
the component instance actually being used.

--
> Wang Zeng
>
> Craig

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message