It's be better if you could describe the specific problem you are
trying to solve. Often, what a filter does is put an override into the
Environment.

On Mon, Feb 20, 2012 at 6:51 AM, Barry Books <trs...@gmail.com> wrote:
> I added a PartialMarkupRendererFilter to my Bootstrap module to
> support AJAX and it does not behave exactly as I expected. In a
> MarkupRendererFilter the content is set after the filter runs so you
> can filter the content with a Visitor. It seems in a
> PartialMarkupRendererFilter the content is placed into the JSONObject
> when renderMarkup is called. This means a Visitor run after
> renderMarkup has no effect on the output. I ended up doing this but it
> seems like the content should be loaded after the filter.
>
>
> public void renderMarkup(MarkupWriter writer, JSONObject reply,
> PartialMarkupRenderer renderer) {
>        renderer.renderMarkup(writer,reply);
>
>        Element root = writer.getDocument().getRootElement();
>        if ( root != null ) {
>                Element body = root.find("ajax-partial");
>                if ( body != null) {
>                        body.visit(frameworkVisitor.visit());
>                }
>                //This does not seem right
>                reply.put("content", body.toString());
>        }
> }
>
> What's the recommended way to do this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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

Reply via email to