I'm trying to create a component that will allow me to define blocks
of HTML to insert into the head. I think this would be useful for ad
hoc JS, style declarations, etc. I know that this can be inserted
using other mechanisms like:

Element head = writer.getDocument().find("html/head");

and inserting your element manually, but this isn't pretty or
easy/possible for the script or style tag contents.

I know that an alternative is just to slap it in the page where the
component is rendered, but that's just sloppy.

On 9/11/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> It's somewhat impossible.  The content isn't stored as a string, but as a
> large collection of objects representing different parts of the template as
> well as components.  You're better off explaining what you want to do if you
> want to avoid a blind alley.
>
> It's a bit easier to get the renderered HTML after a component has rendered.
>
> On 9/11/07, Todd Orr <[EMAIL PROTECTED]> wrote:
> >
> > I've been pulling my hair out over this problem. How do simply get the
> > content of a component?
> >
> > usage given:
> >
> > <t:comp>
> >     <p>Some content</p>
> > </t:comp>
> >
> > I have found that it's quite impossible to get the content into a
> > variable from within the component events.
> >
> > Any ideas?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Partner and Senior Architect at Feature50
>
> Creator Apache Tapestry and Apache HiveMind
>

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

Reply via email to