You did update your application specification to identify the new engine
subclass to instantiate, right?

The page constructor:  the page is loaded (instantiated, then configured)
first, then attached to the engine, so a call to getEngine() returns null
inside the constructor.  You're probably getting a NPE from your
constructor; you should see this in the exception report.

I tend to just lazily create things as needed, rather than pre-create them.

----- Original Message -----
From: "Aejaz Muslim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 28, 2002 11:41 PM
Subject: [Tapestry-developer] Engine/Page constructor question


>
> Hi,
>
> I am extending from SimpleEngine & want to provide a constructor for my
Engine class where I want to initialize database connection & construct some
PreparedStatements, but this constructor is never called(This is a no
argument constructor). I wanted to do the same at page level by providing a
constructor for a page(Home) where I made a call to getEngine() & init()
method of my Engine class but I got an Exception which said that Tapestry
couldn't create the
> instance for the Home page.
>
> Is this the right way to do what I am doing ? Please let me know.
>
> Thanks,
>
> Aejaz
>
>
>
>
>
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to