Thanks a lot, Jeff!

Why this behaviour? Just a matter of taste. It's just seemed to me 
more natural to initialize controller properties in a constructor. 
Same thing can be done in a custom setZZZ method, and that's what I'm 
doing. 

Thanks,

Valeri

---

--------- Original Message ---------

DATE: Fri, 25 Jul 2003 12:08:07
From: "Schnitzer, Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: 

>Two reasons:
>
>1.  Objects of the controller class are instantiated by calling
>Class.newInstance(), which calls a default no-argument constructor.
>
>2.  The interface for Throwaway-type controllers is deliberately the
>same for Singleton-type controllers, so it's not possible to pass
>request-specific data into the constructor.
>
>Why would you need such behavior?
>
>Jeff Schnitzer
>[EMAIL PROTECTED]
>
>> -----Original Message-----
>> From: Valeri Sarantchouk [mailto:[EMAIL PROTECTED]
>> Sent: Friday, July 25, 2003 8:25 AM
>> To: [EMAIL PROTECTED]
>> Subject: [Mav-user] mav context reference
>> 
>> Hi all!
>> 
>> A (silly) question:
>> 
>> Why with ThrowawayFormBeanUser maverich context (and subsecuently
>> HttpServletRequest object) is not available when the controller object
>> is created, but becomes available later in the controller life when
>> makeFormBean() method is called?
>> 
>> Thanks,
>> 
>> Valeri
>> 
>> ---
>> 
>> 
>> 
>> 
>> 
>> 
>> -------------------------------------------------------
>> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
>> Data Reports, E-commerce, Portals, and Forums are available now.
>> Download today and enter to win an XBOX or Visual Studio .NET.
>> http://aspnet.click-
>> url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
>> [INVALID FOOTER]
>
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Free pre-built ASP.NET sites including
>Data Reports, E-commerce, Portals, and Forums are available now.
>Download today and enter to win an XBOX or Visual Studio .NET.
>http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
>[INVALID FOOTER]
>


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
[INVALID FOOTER]

Reply via email to