Tobago has something in place to solve this problem, I think. Maybe we could port the solution over to tomahawk?
regards, Martin On 4/1/06, Andrew Robinson <[EMAIL PROTECTED]> wrote: > I am using AjaxAnywhere and Myfaces 1.1.1 and am having a problem with > Tomahawk components with AJAX. > > AjaxAnywhere updates content within spans: > > <span class="aazone.X">content to update</span> > > Tomahawk 1.1.1 components dynamically add JavaScript and CSS style > sheets to the page's <HEAD, <head <BODY or <body tags. > > The problem: > 1) Render page with <t:tree2 rendered set to false > 2) User clicks on an AJAX'd link > 3) Page re-renders with <t:tree2 rendered set to true (due to > action/actionListener) > 4) Head is not updated with new tomahawk items. > > This is really a problem for me as the Tomahawk controls either don't > work or work/look really badly without those items in the head tag. > AjaxAnywhere uses a static function to find zones to render, so I have > no avenue to extend it and would rather not hack up the source. > Tomahawk's code is pretty convaluted and it does not look easy to > change where it puts the LINK & SCRIPT tags. > > It doesn't look like it is possible to force tomahawk controls to > always output their JavaScript and/or CSS regardless of if they are > rendered or not as the renderer is the one that is adding those items. > > Anyone have a workaround to this problem that doesn't involve the > modification of the open source (Will resort to that last)? > > I suppose I could manually use the add resource when I render my page, > but that may be a bit risky. I have debated using XSLT in a filter to > "move" content around but don't want that performance overhead. I > would rather not buffer the output again as the MyFaces extension is > already buffering the response. > > Thanks, > Andrew > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces

