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

Reply via email to