Howard,

Another thing that would be helpful here...to make the MarkupWriter a
property that the component could replace in BeforeRender with its own
local MarkupWriter, allow the body to render into the temporary
MarkupWriter, and then in AfterRender, put the original MarkupWriter
back in place again.  Then the component has isolated into one Document
everything generated by its own body, and it could do its own
transformations and then call write() on the original MarkupWriter.

Thanks,
Andy

On Thu, 2007-11-08 at 19:50 -0800, Howard Lewis Ship wrote:
> This is one of those cases that is, somewhat delibrately, not covered
> by T5 directly.
> 
> I think you are on to something: capturing the Element and working
> your way into the body to re-write the markup generated by the
> components
> in the body.
> 
> Tapestry uses a very light-weight DOM; I wonder if it would be
> possible to hook an existing XPath engine up to it?
> 
> 
> On Nov 8, 2007 5:55 PM, Andy Huhn <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I'm trying to write a component that allows Tapestry to render its body
> > into the MarkupWriter, and then it performs string substitutions on the
> > MarkupWriter to "transform" the output before it is sent back to the
> > client.  Any ideas?
> >
> > I've looked through a bunch of the source code, and I can't find any
> > built-in components that "examine" their body, or that even are aware of
> > their body (other than to return true or false from beginRenderBody).
> >
> > I thought about using an AfterRender method, getting the MarkupWriter,
> > and using XPath or some other means to manipulate the latest elements
> > added.  But it appears that the MarkupWriter doesn't support XPath.
> >
> > Help?
> >
> > Thanks,
> > Andy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 

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

Reply via email to