You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Randolph Kahle <ra...@variantia.net> on 2004/10/14 19:07:52 UTC
Operational difference between AbstractComponent and BaseComponent
I have a simple renderComponent method:
<<<<<
package net;
import org.apache.tapestry.AbstractComponent;
import org.apache.tapestry.IMarkupWriter;
import org.apache.tapestry.IRequestCycle;
public class Emphasis
extends AbstractComponent
{
protected void renderComponent( IMarkupWriter writer, IRequestCycle
cycle )
{
writer.begin( "em" );
renderBody( writer, cycle );
writer.end();
}
}
>>>>>
If I extend AbstractComponent, the component works as I expect. If I
extend BaseComponent, I get the following error:
<<<<<
Could not find template for component Home/$VariantiaBorder.$Emphasis
in locale en.
>>>>>
What is the operational difference between the two superclasses? Why am
I getting this error?
Regards,
Randy
Re: Operational difference between AbstractComponent and BaseComponent
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
AbstractComponent is the class to extend when you want to
programatically render the output.
BaseComponent is the class to extend when you are using an HTML
template for rendering.
Erik
On Oct 14, 2004, at 1:07 PM, Randolph Kahle wrote:
> I have a simple renderComponent method:
>
> <<<<<
>
> package net;
>
> import org.apache.tapestry.AbstractComponent;
> import org.apache.tapestry.IMarkupWriter;
> import org.apache.tapestry.IRequestCycle;
>
> public class Emphasis
> extends AbstractComponent
> {
>
> protected void renderComponent( IMarkupWriter writer, IRequestCycle
> cycle )
> {
> writer.begin( "em" );
> renderBody( writer, cycle );
> writer.end();
> }
> }
>
> >>>>>
>
>
> If I extend AbstractComponent, the component works as I expect. If I
> extend BaseComponent, I get the following error:
>
>
> <<<<<
>
> Could not find template for component Home/$VariantiaBorder.$Emphasis
> in locale en.
>
> >>>>>
>
>
> What is the operational difference between the two superclasses? Why
> am I getting this error?
>
> Regards,
>
> Randy
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org