You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Holloway <bi...@peoplepad.com> on 2008/05/10 08:19:41 UTC

T5: setupRender (named by convention) not called correctly in hierarchical base classes

I have two abstract component base classes A and B in the base
package.  B inherits from A.  I have methods literally named
"setupRender" in both.  I notice that B's setupRender is called but
not A's.  *However*, if I rename A's setupRender() to some other name
and annotate it with @SetupRender, both methods are called and in the
correct order.

There are probably numerous permutations of renaming, annotating, etc.
 But the problem is illustrated.

-- 
Bill @ PeoplePad

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: setupRender (named by convention) not called correctly in hierarchical base classes

Posted by Bill Holloway <bi...@peoplepad.com>.
That would be a way to do it, but it's just as easy to put
@SetupRender on A's setup render method.  I usually rename it now to
"preRender()" or something.  All good.

On Sat, May 10, 2008 at 5:54 AM, Harald Geritzer <h....@gmail.com> wrote:
> Bill Holloway schrieb:
>
>
> > I have two abstract component base classes A and B in the base
> > package.  B inherits from A.  I have methods literally named
> > "setupRender" in both.  I notice that B's setupRender is called but
> > not A's.  *However*, if I rename A's setupRender() to some other name
> > and annotate it with @SetupRender, both methods are called and in the
> > correct order.
> >
>
>  as you are overriding the method in B, do you call super.setupRender() in
> B?
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Bill @ PeoplePad

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: setupRender (named by convention) not called correctly in hierarchical base classes

Posted by Harald Geritzer <h....@gmail.com>.
Bill Holloway schrieb:
> I have two abstract component base classes A and B in the base
> package.  B inherits from A.  I have methods literally named
> "setupRender" in both.  I notice that B's setupRender is called but
> not A's.  *However*, if I rename A's setupRender() to some other name
> and annotate it with @SetupRender, both methods are called and in the
> correct order.

as you are overriding the method in B, do you call super.setupRender() in B?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org