Hi Mridul, This work was done fairly recently, and hasn't been reflected in any of the programming model docs. The answer is sort of "it depends".
For the set of control containers bundled within Beehive, the generated client initializer class is automatically invoked to initialize nested control references and event handlers. This includes pageflows (JPF), nested controls in a control implementation (JCS), and (soon) web services (JWS). This means that if you author any of these artifacts, the declarative model will "just work". The code to do nested @Control/@EventHandler initialization is generated into a separate class w/ static methods to enable other scenarios: - A user wants to use @Control inside of a regular Java class, where there is no (or only an indirect relationship to a) container. In this model, you'd create a new instance of the class by 'new'-ing, then pass the constructed instance to the generated client initializer to complete the wireup of nested control refs. This process could be hidden from end users of the target class by pushing it into a factory class. - To make it really easy to extend other containers to support the declarative syntax, and to offer consistent semantics when doing so. It's as simple as just adding a call to the generated client initializer as part of the new contained component instance initialization. Note that because all use the same code (the generated client initializer), you get much better guarantees of consistent behavior, whether the initialization is implicit or explicit. -- Kyle > -----Original Message----- > From: Mridul Muralidharan [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 20, 2004 7:06 AM > To: [email protected] > Subject: ClientInitializer documentation > > > Hi, > > Is there any documentation on how to use declarative > programming while > using controls ? > In the tests , I see that they invoke > 'class'ClientInitializer.initialize() while using declarative > mode - is > there any documentation on this ? > > Thanks and Regards > Mridul > > -- > Java Navigator will have a lot of good attributes: It's > slower. It will crash > more and have fewer features. So you can do fewer things. It > will simplify > your life. > > -- Marc Andreesen, as quoted in BrowserWatch > >
