You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by D&J Gredler <dj...@gmail.com> on 2006/06/29 16:38:29 UTC

component allow-body: yes and no

Hi,

I'm trying to create a component that renders the contents of its HTML
template and then renders any body the user of the component may have given
it. If I tell the component specification that allow-body="yes", then the
contents of the component's HTML template do not get rendered, but the
custom body does. If I tell the component that allow-body="no", then the
contents of the component's HTML template get rendered, but (obviously) the
custom body does not.

Is there a method in my component class that I can override to get them both
to render when allow-body="yes"?

Thanks,

Daniel

Re: component allow-body: yes and no

Posted by D&J Gredler <dj...@gmail.com>.
Cool, thanks. I also found the RenderBody component... seems to do the same
thing from within the HTML template.

On 6/29/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Call renderBody() from within your component, somewhere between open/close
> tag if you are writing out an enclosing html element.
>
> On 6/29/06, D&J Gredler <dj...@gmail.com> wrote:
> >
> > Hi,
> >
> > I'm trying to create a component that renders the contents of its HTML
> > template and then renders any body the user of the component may have
> > given
> > it. If I tell the component specification that allow-body="yes", then
> the
> > contents of the component's HTML template do not get rendered, but the
> > custom body does. If I tell the component that allow-body="no", then the
> > contents of the component's HTML template get rendered, but (obviously)
> > the
> > custom body does not.
> >
> > Is there a method in my component class that I can override to get them
> > both
> > to render when allow-body="yes"?
> >
> > Thanks,
> >
> > Daniel
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
>

Re: component allow-body: yes and no

Posted by Jesse Kuhnert <jk...@gmail.com>.
Call renderBody() from within your component, somewhere between open/close
tag if you are writing out an enclosing html element.

On 6/29/06, D&J Gredler <dj...@gmail.com> wrote:
>
> Hi,
>
> I'm trying to create a component that renders the contents of its HTML
> template and then renders any body the user of the component may have
> given
> it. If I tell the component specification that allow-body="yes", then the
> contents of the component's HTML template do not get rendered, but the
> custom body does. If I tell the component that allow-body="no", then the
> contents of the component's HTML template get rendered, but (obviously)
> the
> custom body does not.
>
> Is there a method in my component class that I can override to get them
> both
> to render when allow-body="yes"?
>
> Thanks,
>
> Daniel
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.