Hi,
no it was not in the root.base package. I didn't know about that one.
Probably explains it, will try later tonight. I guess Tapestrys
definition of POJO is a bit different from mine :-)

Cheers,
Johan

On 9/19/07, Josh Canfield <[EMAIL PROTECTED]> wrote:
> Hey Johan,
>
> I haven't had a need to define a custom constructor in my page classes, or
> their base classes, I'm just use the default constructor.
>
> You mentioned that your base class was in "another package", but is it in
> the special "base" package next to your "pages" package?
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html
>
> You can also use the page lifecycle methods for page level initialization.
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/lifecycle.html
>
>
> Josh
>
> On 9/18/07, Johan Maasing <[EMAIL PROTECTED]> wrote:
> >
> > I was wondering if the public no-args constructor requirement on page
> > classes also extends to their parent classes.
> >
> > This is my Start.html
> > ---
> >            [<t:pagelink t:page="Index">Index</t:pagelink>]
> > ---
> > My Index.html contains only static text.
> >
> > My Start.java is an empty POJO.
> >
> > My Index.java looks like this (removed package):
> > ---
> > public class Index extends BasePage {
> >
> >        public Index() {
> >                super("Test");
> >        }
> > }
> > ---
> >
> > The BasePage.java (in another package from my pages) looks like this:
> > ---
> > public abstract class BasePage {
> >        private String title ;
> >
> >        public BasePage(String title) {
> >                super();
> >                this.title = title;
> >        }
> > }
> > ---
> >
> > I get the following error from tapestry when rendering Start.html, it
> > points at the pagelink line and says:
> > java.lang.NoSuchMethodError: xxx.BasePage: method <init>()V not found
> >
> > If I add a public no-args constructor to the BasePage (no changes to
> > Index.java) it does not complain . Is this expected?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to